7 lines
99 B
Plaintext
7 lines
99 B
Plaintext
pub fn abs(f: f32) -> f32 {
|
|
if f < 0.0 {
|
|
return f * (0.0 - 1.0);
|
|
}
|
|
return f;
|
|
}
|