Template Function TRAP::Math::Distance#

Function Documentation#

template<u32 L, typename T>
constexpr T TRAP::Math::Distance(const Vec<L, T> &p0, const Vec<L, T> &p1)#

Calculate the distance between two points.

Parameters:
  • p0 – Specifies the first of two points.

  • p1 – Specifies the second of two points.

Returns:

Distance between p0 and p1, i.e., Length(p0 - p1).