Math - SardonyxLang/SardonyxStd GitHub Wiki

require "math"

Basic mathematical and trigonometric functions.

Object Math

  • Math:sin(x): returns the sine of x.
  • Math:sinh(x): returns the hyperbolic sine of x.
  • Math:asin(x): returns the arcsine of x.
  • Math:asinh(x): returns the hyperbolic arcsine of x.
  • Math:tan(x): returns the tangent of x.
  • Math:tanh(x): returns the hyperbolic tangent of x.
  • Math:atan(x): returns the arctangent of x.
  • Math:atanh(x): returns the hyperbolic arctangent of x.
  • Math:cos(x): returns the cosine of x.
  • Math:cosh(x): returns the hyperbolic cosine of x.
  • Math:acos(x): returns the arccosine of x.
  • Math:acosh(x): returns the hyperbolic arccosine of x.
  • Math:atan2(x, y): returns atan2(x, y).
  • Math:log(x): returns log10(x).
  • Math:sqrt(x): returns the square root of x.
  • Math:abs(x): returns the absolute value of x.