Std.Float
Floating-point conversion and arithmetic operations.
Functions
trunc
fun trunc : (x: Float) -> IntTruncates a float towards zero, returning an integer.
round
fun round : (x: Float) -> IntRounds a float to the nearest integer.
floor
fun floor : (x: Float) -> IntRounds a float down to the nearest integer.
ceil
fun ceil : (x: Float) -> IntRounds a float up to the nearest integer.
parse
fun parse : (s: String) -> Maybe FloatParses a string as a float. Returns Nothing if the string is not a valid float.
add
fun add : Float -> Float -> FloatAdds two floats.
sub
fun sub : Float -> Float -> FloatSubtracts the second float from the first.
mul
fun mul : Float -> Float -> FloatMultiplies two floats.
div
fun div : Float -> Float -> FloatDivides the first float by the second.
mod
fun mod : Float -> Float -> FloatReturns the remainder of dividing the first float by the second.