VEC2Lerp

nn::math::VEC2Lerp Function

Syntax

NN_MATH_INLINE VEC2 * VEC2Lerp(
     VEC2 * pOut,
     const VEC2 * p1,
     const VEC2 * p2,
     f32 t
);

Parameters

Name Description
out pOut Pointer to the buffer that receives the result of the calculation. It is not a problem if this points to the same vector as p1 and/or p2.
in p1 Pointer to the vector that serves as the starting point for linear interpolation.
in p2 Pointer to the vector that serves as the ending point for linear interpolation.
in t Linear interpolation parameter. The result is p1 when this is 0.0 and p2 when this is 1.0.

Return Values

Returns pOut.

Description

Calculates the linear interpolation between vectors.


CONFIDENTIAL