Common Functions
Header: <glm/common.hpp> (included by <glm/glm.hpp>)
These functions operate component-wise.
abs(genType x) -> genTypesign(genType x) -> genTypefloor(genType x) -> genTypetrunc(genType x) -> genTyperound(genType x) -> genTyperoundEven(genType x) -> genTypeceil(genType x) -> genTypefract(genType x) -> genType- Returns \(x-\operatorname{floor}(x)\).
 
mod(genType x, genType y) -> genTypemod(genType x, T y) -> genType- Returns \(x-y\cdot\operatorname{floor}(x/y)\).
 
modf(genType x, /*out*/ genType& i) -> genTypemin(genType x, genType y) -> genTypemin(genType x, T y) -> genTypemax(genType x, genType y) -> genTypemax(genType x, T y) -> genTypeclamp(genType x, genType minVal, genType maxVal) -> genTypeclamp(genType x, T minVal, T maxVal) -> genTypemix(genType x, genType y, genType a) -> genTypemix(genType x, genType y, T a) -> genType- Returns \(x\cdot(1-a)+y\cdot a\).
 
mix(genType x, genType y, genBType a) -> genTypestep(genType edge, genType x) -> genTypestep(T edge, genType x) -> genType- Returns \(0.0\) if \(x < \mathrm{edge}\); otherwise it returns \(1.0\).
 
smoothstep(genType edge0, genType edge1, genType x) -> genTypesmoothstep(T edge0, T edge1, genType x) -> genTypeisnan(genType x) -> genBTypeisinf(genType x) -> genBTypefloatBitsToInt(genType value) -> genITypefloatBitsToUint(genType value) -> genUTypeintBitsToFloat(genIType value) -> genTypeuintBitsToFloat(genUType value) -> genTypefma(genType a, genType b, genType c) -> genType- Returns \(a\cdot b+c\).
 
frexp(genType x, /*out*/ genIType& exp) -> genTypeldexp(genType x, genIType exp) -> genType