//===========================================================================// // File: unitvec.cc // // Project: MUNGA Brick: Math Library // // Contents: Implementation details for unit vector class // //---------------------------------------------------------------------------// // Date Who Modification // // -------- --- ---------------------------------------------------------- // // 11/19/94 JMA Initial coding. // //---------------------------------------------------------------------------// // Copyright (C) 1994-1995, Virtual World Entertainment, Inc. // // All Rights reserved worldwide // // This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL // //===========================================================================// #include #pragma hdrstop #if !defined(UNITVEC_HPP) #include #endif // //############################################################################# //############################################################################# // UnitVector& UnitVector::Lerp( const UnitVector&, // v1, const UnitVector&, // v2, Scalar // t ) { Check_Pointer(this); Tell("UnitVector::Lerp stubbed out!\n"); return *this; } // //############################################################################# //############################################################################# // Logical UnitVector::TestInstance() const { Scalar length = Vector3D::LengthSquared(); Scalar diff = 1.0f - length; if (!Small_Enough(diff,2e-5)) { length = x*x + y*y + z*z; diff = 1.0f - length; if (!Small_Enough(diff,2e-5)) { Dump(*this); Dump(length); Dump(x*x + y*y + z*z); Dump(diff); return False; } } return True; } #if defined(TEST_CLASS) # include "unitvec.tcp" #endif