593 B
593 B
📐 AiraLang math Module
Mathematical Functions & Constants
Import
import "math";
Methods & Constants
math.sqrt(x): Square root.math.floor(x),math.ceil(x): Rounding down and up.math.abs(x): Absolute value.math.round(x, [decimals]): Rounding.math.pow(base, exp): Exponentiation.math.random(low, high): Generate random integer or float.math.pi:\piconstant (~3.14159265).math.e: Euler constant (~2.7182818).
Example
import "math";
say "Hypotenuse: " + math.sqrt(math.pow(3, 2) + math.pow(4, 2)); # 5.0