DLiteScript
Playground
Documentation
math Namespace
Mathematical functions and operations.
math.abs
Return the absolute value of a number. Calculate the non-negative value of any number, removing the sign for maths operations. Part of the math namespace.
math.ceil
Round a number up to the nearest integer. Calculate the smallest integer greater than or equal to the given number value. Part of the math namespace.
math.cos
Calculate the cosine of an angle in radians. Return the trigonometric cosine value for mathematical and geometric calculations. Part of the math namespace.
math.floor
Round a number down to the nearest integer. Calculate the largest integer less than or equal to the given number value. Part of the math namespace.
math.log
Calculate the natural logarithm (base e) of a number. Return the logarithmic value for mathematical and scientific calculations. Part of the math namespace.
math.log10
Calculate the base-10 logarithm of a number. Return the common logarithmic value for mathematical and scientific calculations. Part of the math namespace.
math.max
Find the larger of two numbers. Compare two number values and return the maximum value for mathematical calculations. Part of the math namespace.
math.min
Find the smaller of two numbers. Compare two number values and return the minimum value for mathematical calculations. Part of the math namespace.
math.mod
Calculate the remainder of division. Return the modulo value when dividing two numbers for mathematical operations. Part of the math namespace.
math.pow
Raise a number to a specified power. Calculate exponential values by raising base number to exponent for mathematical calculations. Part of the math namespace.
math.round
Round a number to the nearest integer. Calculate the closest whole number value using standard rounding rules for calculations. Part of the math namespace.
math.sign
Determine the sign of a number. Return -1 for negative numbers, 0 for zero, or 1 for positive numbers for conditional logic. Part of the math namespace.
math.sin
Calculate the sine of an angle in radians. Return the trigonometric sine value for mathematical and geometric calculations. Part of the math namespace.
math.sqrt
Calculate the square root of a number. Return the square root value for mathematical calculations and geometric formulas. Part of the math namespace.
math.tan
Calculate the tangent of an angle in radians. Return the trigonometric tangent value for mathematical and geometric calculations. Part of the math namespace.