Back to class index
MathFunc.h[File Summary]
#define DOT2
#define DOT3
#define ABSDOT3
#define DOT3_xyz
#define DOT3STRIDED
#define DOT4
#define DOT4STRIDED
#define DOT4POS
#define DOT4POS_xyz
#define DOT4DIR
#define DOT4DIR_xyz
#define MATH_SKIP_WORD
#define MATH_NEXT_WORD_IS
DegToRad(degrees) (+1 overload)
RadToDeg(radians) (+1 overload)
Sin(angleRadians)
Cos(angleRadians)
Tan(angleRadians)
SinCos(...)
SinCos2(...)
SinCos3(...)
SinCos4(...)
Asin(x)
Acos(x)
Atan(x)
Atan2(y,x)
Sinh(x)
Cosh(x)
Tanh(x)
IsPow2(number) (+3 overloads)
RoundUpPow2(number) (+3 overloads)
RoundDownPow2(number) (+3 overloads)
RoundIntUpToMultipleOfPow2(x,n) (+1 overload)
PowInt(base,exponent)
Pow(base,exponent)
Exp(exponent)
Log(base,value)
Log2(value)
Ln(value)
Log10(value)
Ceil(f)
CeilInt(f)
Floor(f)
FloorInt(f)
Round(f)
RoundInt(f)
Sign(f)
SignOrZero(f,epsilon)
Lerp(a,b,t)
LerpMod(a,b,mod,t)
InvLerp(a,b,x)
Step(y,x)
SmoothStep(min,max,x)
PingPongMod(x,mod)
Mod(x,mod) (+1 overload)
ModPos(x,mod) (+1 overload)
Frac(x)
Sqrt(x)
SqrtFast(x)
RSqrt(x)
RSqrtFast(x)
Recip(x)
RecipFast(x)
Factorial(n)
CombinatorialRec(n,k)
CombinatorialTab(n,k)
Clamp(val,floor,ceil)
Clamp01(val)
Min(a,b)
Max(a,b) (+1 overload)
Min(a,b,c) (+1 overload)
Max(a,b,c)
Min(a,b,c,d)
Max(a,b,c,d)
Swap(a,b)
GreaterThan(a,b)
LessThan(a,b)
Abs(a) (+1 overload)
Equal(a,b) (+3 overloads)
EqualAbs(a,b,epsilon)
RelativeError(a,b)
EqualRel(a,b,maxRelError)
EqualUlps(a,b,maxUlps)
IsFinite()
IsFinite< float >(f)
IsFinite< double >(d)
IsNan(f) (+1 overload)
IsInf(f) (+1 overload)
IsFinite< long double >(value)
IsInf(value)
IsNan(value)
SerializeFloat(f,dstStr)
DeserializeFloat(str,outEndStr)
DeserializeDouble(str,outEndStr)

DOT4STRIDED

Syntax

#define DOT4STRIDED(v1,v2,stride) ((v1)[0] * (v2)[0] + (v1)[1] * (v2)[stride] + (v1)[2] * (v2)[2*stride] + (v1)[3] * (v2)[3*stride]) [1 line of code]

Computes the dot product of two 4D vectors, but with the elements of the second vector being scattered noncontiguous in memory.

Parameters

v1The first vector in the dot product. This can either be a C array or a float4. v2The second vector in the dot product. As opposed to the DOT4() macro, which accesses the elements of this vector as v2[0], v2[1], v2[2], v2[3], this function accesses the elements as v2[0], v2[stride], v2[2*stride], v2[3*stride]. strideThe distance between between the subsequent vector elements in the array v2.

See Also

DOT4(), DOT4POS(), DOT4POS_xyz(), DOT4DIR(), DOT4DIR_xyz().