polyplex.math.mathf

Undocumented in source.

Members

Aliases

ACos
alias ACos = std.math.acos
Undocumented in source.
ACosH
alias ACosH = std.math.acosh
Undocumented in source.
ASin
alias ASin = std.math.asin
Undocumented in source.
ASinH
alias ASinH = std.math.asinh
Undocumented in source.
ATan
alias ATan = std.math.atan
Undocumented in source.
ATan2
alias ATan2 = std.math.atan2
Undocumented in source.
ATanH
alias ATanH = std.math.atanh
Undocumented in source.
Abs
alias Abs = std.math.abs
Undocumented in source.
Ceil
alias Ceil = std.math.ceil
Undocumented in source.
Cos
alias Cos = std.math.cos
Undocumented in source.
CosH
alias CosH = std.math.cosh
Undocumented in source.
Exp
alias Exp = std.math.exp
Undocumented in source.
Exp2
alias Exp2 = std.math.exp2
Undocumented in source.
Floor
alias Floor = std.math.floor
Undocumented in source.
Fmod
alias Fmod = std.math.fmod
Undocumented in source.
IsFinite
alias IsFinite = std.math.isFinite
Undocumented in source.
IsIdentical
alias IsIdentical = std.math.isIdentical
Undocumented in source.
IsInfinity
alias IsInfinity = std.math.isInfinity
Undocumented in source.
IsNaN
alias IsNaN = std.math.isNaN
Undocumented in source.
IsPowerOf2
alias IsPowerOf2 = std.math.isPowerOf2
Undocumented in source.
LogBase10
alias LogBase10 = std.math.log10
Undocumented in source.
LogBase2
alias LogBase2 = std.math.log2
Undocumented in source.
LogNatural
alias LogNatural = std.math.log
Undocumented in source.
Mix
alias Mix = Lerp

Alias for linear interpolation, to follow the same GLSL convention

Pow
alias Pow = std.math.pow
Undocumented in source.
Remainder
alias Remainder = std.math.remainder
Undocumented in source.
Round
alias Round = std.math.round
Undocumented in source.
Sign
alias Sign = std.math.sgn
Undocumented in source.
Sin
alias Sin = std.math.sin
Undocumented in source.
SinH
alias SinH = std.math.sinh
Undocumented in source.
Sqrt
alias Sqrt = std.math.sqrt
Undocumented in source.
Tan
alias Tan = std.math.tan
Undocumented in source.
TanH
alias TanH = std.math.tanh
Undocumented in source.
Truncate
alias Truncate = std.math.trunc
Undocumented in source.

Functions

ApproxEquals
bool ApproxEquals(T a, T b, T eps)

Checks if two floating-point scalars are approximately equal to each other by some epsilon

Clamp
T Clamp(T x, T min, T max)

Clamps scalar elements

Cosine
T Cosine(T x, T y, float a)

Cosine interpolation on scalar elements. It interpolates between two scalars x and y using a cosine-weighted a (this function applies the cosine-weight). Check Linear for more details.

Hermite
T Hermite(T x, T y, T z, T w, float a, float tension, float bias)

Hermite interpolation on scalar elements. Similar to CubicInterpolation except that you have control over the tension (tightening of the curvature) and bias (twists the curve about known points).

Lerp
T Lerp(T x, T y, float a)

Linear interpolation on scalar elements. Interpolates between two scalar values x and y using a linear gradient a

Max
T Max(T scalar_a, T scalar_b)

Maximum of two scalar elements

Min
T Min(T scalar_a, T scalar_b)

Minimum of two scalar elements

SmoothStep
T SmoothStep(T x, T y, float a)

Hermite interpolation on scalar elements as described by GLSL smoothstep. Interpolates between x and y using gradient a that allows smooth transitions as the gradient approaches 1 or 0. See LinearInterpolation for more details.

Spline
T Spline(T x, T y, T z, T w, float a)

Cube interpolation using Catmull-Rom splines on scalar elements. Interpolates between two scalars y and z using a gradient a that takes x <-> y and z <-> w into account in order to offer better continuity between segments. Check LinearInerpolation for more details.

Step
T Step(T edge, T a)

Steps scalar a on edge edge. Returns 0 if a < edge, otherwise 1

ToDegrees
T ToDegrees(T radians)

Converts quantity of radians to degrees

ToRadians
T ToRadians(T degrees)

Converts quantity of degrees to radians

Imports

E (from std.math)
public import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
Undocumented in source.
LN10 (from std.math)
public import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
Undocumented in source.
LN2 (from std.math)
public import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
Undocumented in source.
LOG10E (from std.math)
public import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
Undocumented in source.
LOG2 (from std.math)
public import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
Undocumented in source.
LOG2E (from std.math)
public import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
Undocumented in source.
LOG2T (from std.math)
public import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
Undocumented in source.
M_1_PI (from std.math)
public import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
Undocumented in source.
M_2_PI (from std.math)
public import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
Undocumented in source.
M_2_SQRTPI (from std.math)
public import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
Undocumented in source.
PI (from std.math)
public import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
Undocumented in source.
PI_2 (from std.math)
public import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
Undocumented in source.
PI_4 (from std.math)
public import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
Undocumented in source.
SQRT1_2 (from std.math)
public import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
Undocumented in source.
SQRT2 (from std.math)
public import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
Undocumented in source.

Variables

TAU
enum real TAU;

TAU = PI*2

Meta