Math
All ops normal, except /
always returns float
div(5, 4) is integer division => 1
rem(5, 4) is modulo => 1
Float, Integer different and different libs
Kernel has functions that work on many
easiness_factor = (card.easiness_factor + (0.1 - (5 - q) * (0.08 + (5 - q) * 0.02))) |> Float.round(3) |> Kernel
Kernel
.min
.max
.round - to nearest integer
Random Number
:rand.uniform(n) #1-n inclusive
Last updated