By: Diego Coronel, Roland Tepp
Functions
adjustedModSource Codeshared Integer adjustedMod(Integer x, Integer y)

Returns an adjusted remainder of the two integers.

value moduli = [for (x in 4..-4) amod(x, 4)]; assert( moduli == [4, 3, 2, 1, 4, 3, 2, 1, 4] );

floorSource Codeshared Integer floor(Float x)

Returns the largest integer less than or equal to x.

floorDivSource Codeshared Integer floorDiv(Integer x, Integer y)

Returns floored division of the two integers.

floorModSource Codeshared Integer floorMod(Integer x, Integer y)

Returns the floor remainder (modulus) of the two integers.

value moduli = [for (x in 4..-4) mod(x, 4)] 
assert( moduli == [0, 3, 2, 1, 0, 3, 2, 1, 0] );
roundSource Codeshared Integer round(Float f)

Returns nearest integer to x