math Module
This one is a brief module because these math functions are common in basically every programming language, so I’ll keep the explanations short and straight to the point.
math.mini(a: i64, b: i64)
Returns the minimum of two i64 values
Returns
i64: The lower value between parametersaandb
math.maxi(a: i64, b: i64)
Returns the maximum of two i64 values
Returns
i64: The higher value between parametersaandb
math.minf(a: f64, b: f64)
Returns the minimum of two f64 values
Returns
f64: The lower value between parametersaandb
math.maxf(a: f64, b: f64)
Returns the minimum of two f64 values
Returns
f64: The higher value between parametersaandb
math.randi(min_v: i64, max_v: i64)
Returns a random integer between a minimum and maximum value, inclusive
Returns
i64: A random integer between your provided minimum and maximum
math.randf(min_v: f64, max_v: f64)
Returns a random number between a minimum and maximum value, inclusive
Returns
f64: A random number between your provided minimum and maximum