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)

DOT3STRIDED

Syntax

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

Computes the dot product of two 3D 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 float3. v2The second vector in the dot product. As opposed to the DOT3() macro, which accesses the elements of this vector as v2[0], v2[1], v2[2], this function accesses the elements as v2[0], v2[stride], v2[2*stride]. strideThe distance between between the subsequent vector elements in the array v2.

See Also

DOT3(), ABSDOT3(), DOT3_xyz(), DOT4STRIDED().