Files
TeslaRel410/CODE/BT/MUNGA/UNITVEC.CPP
T
CydandClaude Fable 5 fdd9ac9d97 Initial import: Tesla Release 4.10 (Tesla:BattleTech & Tesla:Red Planet)
Archival snapshot of the Virtual World Entertainment Tesla cockpit
software, 1994-1996: MUNGA engine and L4 pod layer source (Borland
C++ 5.0), BT/RP game code, and game content (models, audio, maps,
gauges, Division renderer data). Includes third-party libraries:
Division dVS/DPL graphics, HMI SOS audio, WATTCP networking.

Files are preserved byte-for-byte (.gitattributes disables all
line-ending conversion). README.md documents the layout, target
hardware, and toolchain.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 13:21:58 -05:00

67 lines
2.1 KiB
C++

//===========================================================================//
// 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 <munga.hpp>
#pragma hdrstop
#if !defined(UNITVEC_HPP)
#include <unitvec.hpp>
#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