Number Class

All numbers in Quby are full objects in their own right. For example 90 and 5.342 are both objects. You can call methods on numbers, just like with regular objects, such as '90.toRadians()'.

The Number class has no constructor. Instead instances are created out of number constants, such as '4', or through mathematical operations, such as '4 + 5'.

Lots of common mathematical functions are available on the Number class, such as those for trigonometry, converting between angles, or for rounding.

Some of the mathematical functions take, or return, an angle. This angle is always a radian value.

times

upTo

downTo

to

min

max

limit

wrap

toDegrees

toRadians

acos

asin

atan

atan2

sin

cos

tan

sqrt

square

cube

pow

exp

log

abs

ceil

floor

round