Float
is a smaller numerical floating point type. Its literals are
suffixed with f
.
*
external
(Fn [Float, Float] Float)
+
external
(Fn [Float, Float] Float)
-
external
(Fn [Float, Float] Float)
/
external
(Fn [Float, Float] Float)
<
external
(Fn [Float, Float] Bool)
=
external
(Fn [Float, Float] Bool)
>
external
(Fn [Float, Float] Bool)
abs
external
(Fn [Float] Float)
acos
external
(Fn [Float] Float)
add-ref
defn
(Fn [(Ref Float a), (Ref Float b)] Float)
(add-ref x y)
approx
defn
(Fn [a, a] Bool)
(approx x y)
checks whether x
and y
are approximately equal.
The margin of error is 0.00001.
asin
external
(Fn [Float] Float)
atan
external
(Fn [Float] Float)
atan2
external
(Fn [Float, Float] Float)
blit
defn
(Fn [Float] Float)
(blit x)
ceil
external
(Fn [Float] Float)
clamp
defn
(Fn [a, a, a] a)
(clamp min max val)
copy
external
(Fn [(Ref Float a)] Float)
cos
external
(Fn [Float] Float)
cosh
external
(Fn [Float] Float)
dec
defn
(Fn [Float] Float)
(dec x)
exp
external
(Fn [Float] Float)
floor
external
(Fn [Float] Float)
external
(Fn [(Ref String a), Float] String)
frexp
external
(Fn [Float, (Ref Int a)] Float)
from-string
defn
(Fn [(Ref String a)] (Maybe Float))
(from-string s)
hash
defn
(Fn [(Ref Float a)] Int)
(hash k)
inc
defn
(Fn [Float] Float)
(inc x)
ldexp
external
(Fn [Float, Int] Float)
log
external
(Fn [Float] Float)
log10
external
(Fn [Float] Float)
mod
external
(Fn [Float, Float] Float)
modf
external
(Fn [Float, (Ref Float a)] Float)
neg
external
(Fn [Float] Float)
pow
external
(Fn [Float, Float] Float)
prn
defn
(Fn [Float] String)
(prn x)
random
defn
(Fn [] Float)
(random)
random-between
defn
(Fn [Float, Float] Float)
(random-between lower upper)
round
external
(Fn [Float] Int)
sin
external
(Fn [Float] Float)
sinh
external
(Fn [Float] Float)
sqrt
external
(Fn [Float] Float)
str
external
(Fn [Float] String)
tan
external
(Fn [Float] Float)
tanh
external
(Fn [Float] Float)
to-int
external
(Fn [Float] Int)
zero
defn
(Fn [] Float)
(zero)
returns 0.0f
.