예제 #1
0
bool float4::IsPerpendicular(const float4 &other, float epsilonSq) const
{
	float dot = Dot(other);
	return dot*dot <= epsilonSq * LengthSq() * other.LengthSq();
}
예제 #2
0
float4 float4::ProjectTo(const float4 &target) const
{
	assume(!target.IsZero());
	assume(this->IsWZeroOrOne());
	return target * (this->Dot(target) / target.LengthSq());
}