gl3n.math
Provides nearly all GLSL functions, according to spec 4.1,
it also publically imports other useful functions (from std.math, core.stdc.math, std.alogrithm)
so you only have to import this file to get all mathematical functions you need.
Publically imports: PI, sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh,
asinh, acosh, atanh, pow, exp, log, exp2, log2, sqrt, abs, floor, trunc, round, ceil, modf,
fmodf, min, max.
PI / 180 at compiletime, used for degrees/radians conversion.
180 / PI at compiletime, used for degrees/radians conversion.
Modulus. Returns x - y * floor(x/y).
Calculates the absolute value.
Calculates the absolute value per component.
Returns 1/sqrt(x), results are undefined if x <= 0.
Returns 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < 0.
Compares to values and returns true if the difference is epsilon or smaller.
Converts degrees to radians.
Compiletime version of radians.
Converts radians to degrees.
Compiletime version of degrees.
Returns min(max(x, min_val), max_val), Results are undefined if min_val > max_val.
Returns 0.0 if x < edge, otherwise it returns 1.0.
Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and performs smooth hermite interpolation between 0 and 1 when edge0 < x < edge1. This is useful in cases where you would want a threshold function with a smooth transition.