MCPcopy Create free account
hub / github.com/IntegralPilot/rustc_codegen_jvm / choose_curve

Function choose_curve

tests/binary/fn_pointers/src/main.rs:73–81  ·  view source on GitHub ↗
(which: i32)

Source from the content-addressed store, hash-verified

71}
72
73fn choose_curve(which: i32) -> fn(f64) -> f64 {
74 if which == 0 {
75 constant
76 } else if which == 1 {
77 linear
78 } else {
79 square
80 }
81}
82
83fn linear(x: f64) -> f64 {
84 2.0 * x + 3.0

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected