math.util #

fn fabs_32 #

fn fabs_32(v f32) f32

fabs_32 returns the absolute value of a as a f32 value.

Example

assert fabs_32(-2.0) == 2.0

fn fabs_64 #

fn fabs_64(v f64) f64

fabs_64 returns the absolute value of a as a f64 value.

Example

assert fabs_64(-2.0) == f64(2.0)

fn fmax_32 #

fn fmax_32(a f32, b f32) f32

fmax_32 returns the largest f32 of input a and b.

Example

assert fmax_32(2.0,3.0) == 3.0

fn fmax_64 #

fn fmax_64(a f64, b f64) f64

fmax_64 returns the largest f64 of input a and b.

Example

assert fmax_64(2.0,3.0) == 3.0

fn fmin_32 #

fn fmin_32(a f32, b f32) f32

fmin_32 returns the smallest f32 of input a and b.

Example

assert fmin_32(2.0,3.0) == 2.0

fn fmin_64 #

fn fmin_64(a f64, b f64) f64

fmin_64 returns the smallest f64 of input a and b.

Example

assert fmin_64(2.0,3.0) == 2.0

fn iabs #

fn iabs(v int) int

iabs returns an integer as absolute value

fn imax #

fn imax(a int, b int) int

imin returns the biggest of two integer values

fn imin #

fn imin(a int, b int) int

imin returns the smallest of two integer values

fn uabs #

fn uabs(v u32) u32

uabs returns an u32 as absolute value

fn umax #

fn umax(a u32, b u32) u32

umax returns the biggest of two u32 values

fn umin #

fn umin(a u32, b u32) u32

umin returns the smallest of two u32 values