Number methods
Although CSML differentiates between Float and Integer, all methods are available on all Number types. Hence, the Number type does not really exist but represents indifferently Float and Integer.
Given the automatic type inference, CSML will automatically try to map integers and floats to whichever type makes more sense in the context.
.pow(Number)
Raise the target integer to the power of the given integer.
.abs()
Return the absolute value of the target number.
.cos(), .sin(), .tan()
Return the cosine, sine or tangent of the target number.
.floor(), .ceil(), .round()
Round the number respectively down, up or using mathematical rounding.
.precision(n)
Last updated