sqr

Returns val*val.

Syntax:

sqr(val);


Argument Description
val The number to square.


Returns: Real


Description

Multiplies a number by itself and so returns the square of that number. EG: sqr(5) would return 25 since 5*5=25.


Example:

score += sqr(dmg);

The above code will add on the square of the variable "dmg" to the score.


Back: Real Number Functions
Next: sqrt
© Copyright YoYo Games Ltd. 2018 All Rights Reserved