Skip to main content

arith

Function arith 

Source
pub fn arith(op: ArithOp, a: f64, b: f64) -> f64
Expand description

Luau’s number semantics, IEEE-754 doubles all the way.

  • a // b is floor(a / b).
  • a % b is a - floor(a / b) * b, so the result takes the divisor’s sign.
  • Dividing by zero gives ±inf or NaN, it’s not an error.