コード例 #1
0
ファイル: vector4.cpp プロジェクト: Johnicholas/EldritchCopy
void Vector4::FastNormalize()
{
	// No error checking, plus fast inverse square root
	float recLen = FastInvSqRt( LengthSquared() );
	x *= recLen;
	y *= recLen;
	z *= recLen;
	w *= recLen;
}
コード例 #2
0
ファイル: quat.cpp プロジェクト: MinorKeyGames/Eldritch
Quat Quat::GetFastNormalized() const
{
	// No error checking, plus fast inverse square root
	float recLen = FastInvSqRt( LengthSquared() );
	return Quat( w * recLen, x * recLen, y * recLen, z * recLen );
}
コード例 #3
0
ファイル: plane.cpp プロジェクト: ptitSeb/Eldritch
Plane Plane::GetFastNormalized() const {
  float RecL = FastInvSqRt(m_Normal.LengthSquared());
  return Plane(m_Normal * RecL, m_Distance * RecL);
}
コード例 #4
0
ファイル: plane.cpp プロジェクト: ptitSeb/Eldritch
void Plane::FastNormalize() {
  float RecL = FastInvSqRt(m_Normal.LengthSquared());
  m_Normal *= RecL;
  m_Distance *= RecL;
}