MathLib
Loading...
Searching...
No Matches
Functions
QuaternionTests Namespace Reference

Functions

void TestRotationAtRegularIntervals (Quaternionf begin, Degreef amount_of_rotation, Vector3Df rotation_axis, int num_equal_steps)
 
void Run ()
 
void UnitQuaternionIsAsExpected ()
 
void ZeroQuaternionIsAsExpected ()
 
void QuaternionIsConstructedAsExpected ()
 
void QuaternionAddsPerComponent ()
 
void OperatorEqualsComparesMatchingComponents ()
 
void OperatorNotEqualsIsOppositeOfEquals ()
 
void CopyOperatorIsImplemented ()
 
void ConjugateInvertsTheImaginaryComponents ()
 
void ConjugateIsItsOwnInverse ()
 
void RotatingA3DPointByUnitRotationLeavesPointUnchanged ()
 
void IJKUnitQuaternionsAreDefined ()
 
void ISquaredIsNegativeOne ()
 
void JSquaredIsNegativeOne ()
 
void KSquaredIsNegativeOne ()
 
void IJKIsNegativeOne ()
 
void IJEqualsK ()
 
void JIEqualsNegativeK ()
 
void JKEqualsI ()
 
void KJEqualsNegativeI ()
 
void KIEqualsJ ()
 
void IKEqualsNegativeJ ()
 
void HasOperatorNegate ()
 
void OperatorPlusAndMinusAreInverses ()
 
void NormIsEquivalentToDistance ()
 
void UnitQuaternionHasNormOfOne ()
 
void DividingByAScalarDividesEachComponent ()
 
void MultiplyingByAScalarMultipliesEachComponent ()
 
void MultiplyingByItsOwnInverseProducesUnity ()
 
void InverseOfAUnitQuaternionIsItsConjugate ()
 
void UnitQuaternionIsNear1 ()
 
void MakePureQuaternionSetsRealComponentToZero ()
 
void MakePureQuaternionSetsImaginaryVectorToInputParameters ()
 
void ImaginaryReturnsIJK ()
 
void DotProductMultiplesCorrespondingElementsAndThenSumsTheResultingValues ()
 
void MultiplyingAQuaternionByItsConjugateProducesAPureRealNumber ()
 
void MagnitudeSquaredIsValueOfRealPartOfProductOfAQuaternionAndItsConjugate ()
 
void DivisionIsJustMultiplyingByTheInverse ()
 
void ARotationIsStoredAsTheHalfAngle ()
 
void MakingARotationIsAccurate ()
 
void PerformTwoConsecutiveRotations ()
 
void TestPow ()
 
void TestExp ()
 
void ExpAndLogAreInversesOfEachOther ()
 
void TestSlerp ()
 
void IsNaNIsTrueWhenAtLeastOneMemberIsNaN ()
 
void IsInfIsTrueWhenAtLeastOneMemberIsInf ()
 
void DivideByZeroProducesInf ()
 

Detailed Description

Contains the unit tests for Quaternion

Function Documentation

◆ ARotationIsStoredAsTheHalfAngle()

void ARotationIsStoredAsTheHalfAngle ( )

Definition at line 475 of file TestQuaternion.cpp.

◆ ConjugateInvertsTheImaginaryComponents()

void ConjugateInvertsTheImaginaryComponents ( )

Definition at line 146 of file TestQuaternion.cpp.

◆ ConjugateIsItsOwnInverse()

void ConjugateIsItsOwnInverse ( )

Definition at line 166 of file TestQuaternion.cpp.

◆ CopyOperatorIsImplemented()

void CopyOperatorIsImplemented ( )

Definition at line 136 of file TestQuaternion.cpp.

◆ DivideByZeroProducesInf()

void DivideByZeroProducesInf ( )

Definition at line 675 of file TestQuaternion.cpp.

◆ DividingByAScalarDividesEachComponent()

void DividingByAScalarDividesEachComponent ( )

Definition at line 332 of file TestQuaternion.cpp.

◆ DivisionIsJustMultiplyingByTheInverse()

void DivisionIsJustMultiplyingByTheInverse ( )

Definition at line 463 of file TestQuaternion.cpp.

◆ DotProductMultiplesCorrespondingElementsAndThenSumsTheResultingValues()

void DotProductMultiplesCorrespondingElementsAndThenSumsTheResultingValues ( )

Definition at line 430 of file TestQuaternion.cpp.

◆ ExpAndLogAreInversesOfEachOther()

void ExpAndLogAreInversesOfEachOther ( )

Definition at line 609 of file TestQuaternion.cpp.

◆ HasOperatorNegate()

void HasOperatorNegate ( )

Definition at line 284 of file TestQuaternion.cpp.

◆ IJEqualsK()

void IJEqualsK ( )

Definition at line 237 of file TestQuaternion.cpp.

◆ IJKIsNegativeOne()

void IJKIsNegativeOne ( )

Definition at line 228 of file TestQuaternion.cpp.

◆ IJKUnitQuaternionsAreDefined()

void IJKUnitQuaternionsAreDefined ( )

Definition at line 189 of file TestQuaternion.cpp.

◆ IKEqualsNegativeJ()

void IKEqualsNegativeJ ( )

Definition at line 275 of file TestQuaternion.cpp.

◆ ImaginaryReturnsIJK()

void ImaginaryReturnsIJK ( )

Definition at line 419 of file TestQuaternion.cpp.

◆ InverseOfAUnitQuaternionIsItsConjugate()

void InverseOfAUnitQuaternionIsItsConjugate ( )

Definition at line 383 of file TestQuaternion.cpp.

◆ IsInfIsTrueWhenAtLeastOneMemberIsInf()

void IsInfIsTrueWhenAtLeastOneMemberIsInf ( )

Definition at line 663 of file TestQuaternion.cpp.

◆ IsNaNIsTrueWhenAtLeastOneMemberIsNaN()

void IsNaNIsTrueWhenAtLeastOneMemberIsNaN ( )

Definition at line 651 of file TestQuaternion.cpp.

◆ ISquaredIsNegativeOne()

void ISquaredIsNegativeOne ( )

Definition at line 198 of file TestQuaternion.cpp.

◆ JIEqualsNegativeK()

void JIEqualsNegativeK ( )

Definition at line 244 of file TestQuaternion.cpp.

◆ JKEqualsI()

void JKEqualsI ( )

Definition at line 252 of file TestQuaternion.cpp.

◆ JSquaredIsNegativeOne()

void JSquaredIsNegativeOne ( )

Definition at line 208 of file TestQuaternion.cpp.

◆ KIEqualsJ()

void KIEqualsJ ( )

Definition at line 268 of file TestQuaternion.cpp.

◆ KJEqualsNegativeI()

void KJEqualsNegativeI ( )

Definition at line 259 of file TestQuaternion.cpp.

◆ KSquaredIsNegativeOne()

void KSquaredIsNegativeOne ( )

Definition at line 218 of file TestQuaternion.cpp.

◆ MagnitudeSquaredIsValueOfRealPartOfProductOfAQuaternionAndItsConjugate()

void MagnitudeSquaredIsValueOfRealPartOfProductOfAQuaternionAndItsConjugate ( )

Definition at line 452 of file TestQuaternion.cpp.

◆ MakePureQuaternionSetsImaginaryVectorToInputParameters()

void MakePureQuaternionSetsImaginaryVectorToInputParameters ( )

Definition at line 408 of file TestQuaternion.cpp.

◆ MakePureQuaternionSetsRealComponentToZero()

void MakePureQuaternionSetsRealComponentToZero ( )

Definition at line 401 of file TestQuaternion.cpp.

◆ MakingARotationIsAccurate()

void MakingARotationIsAccurate ( )

Definition at line 506 of file TestQuaternion.cpp.

◆ MultiplyingAQuaternionByItsConjugateProducesAPureRealNumber()

void MultiplyingAQuaternionByItsConjugateProducesAPureRealNumber ( )

Definition at line 440 of file TestQuaternion.cpp.

◆ MultiplyingByAScalarMultipliesEachComponent()

void MultiplyingByAScalarMultipliesEachComponent ( )

Definition at line 351 of file TestQuaternion.cpp.

◆ MultiplyingByItsOwnInverseProducesUnity()

void MultiplyingByItsOwnInverseProducesUnity ( )

Definition at line 369 of file TestQuaternion.cpp.

◆ NormIsEquivalentToDistance()

void NormIsEquivalentToDistance ( )

Definition at line 309 of file TestQuaternion.cpp.

◆ OperatorEqualsComparesMatchingComponents()

void OperatorEqualsComparesMatchingComponents ( )

Definition at line 100 of file TestQuaternion.cpp.

◆ OperatorNotEqualsIsOppositeOfEquals()

void OperatorNotEqualsIsOppositeOfEquals ( )

Definition at line 114 of file TestQuaternion.cpp.

◆ OperatorPlusAndMinusAreInverses()

void OperatorPlusAndMinusAreInverses ( )

Definition at line 296 of file TestQuaternion.cpp.

◆ PerformTwoConsecutiveRotations()

void PerformTwoConsecutiveRotations ( )

Definition at line 537 of file TestQuaternion.cpp.

◆ QuaternionAddsPerComponent()

void QuaternionAddsPerComponent ( )

Definition at line 86 of file TestQuaternion.cpp.

◆ QuaternionIsConstructedAsExpected()

void QuaternionIsConstructedAsExpected ( )

Definition at line 74 of file TestQuaternion.cpp.

◆ RotatingA3DPointByUnitRotationLeavesPointUnchanged()

void RotatingA3DPointByUnitRotationLeavesPointUnchanged ( )

Definition at line 175 of file TestQuaternion.cpp.

◆ Run()

void Run ( )

Run all of the unit tests in this namespace

Definition at line 688 of file TestQuaternion.cpp.

◆ TestExp()

void TestExp ( )

Definition at line 595 of file TestQuaternion.cpp.

◆ TestPow()

void TestPow ( )

Definition at line 570 of file TestQuaternion.cpp.

◆ TestRotationAtRegularIntervals()

void TestRotationAtRegularIntervals ( Quaternionf  begin,
Degreef  amount_of_rotation,
Vector3Df  rotation_axis,
int  num_equal_steps 
)

Definition at line 32 of file TestQuaternion.cpp.

◆ TestSlerp()

void TestSlerp ( )

Definition at line 627 of file TestQuaternion.cpp.

◆ UnitQuaternionHasNormOfOne()

void UnitQuaternionHasNormOfOne ( )

Definition at line 322 of file TestQuaternion.cpp.

◆ UnitQuaternionIsAsExpected()

void UnitQuaternionIsAsExpected ( )

Definition at line 50 of file TestQuaternion.cpp.

◆ UnitQuaternionIsNear1()

void UnitQuaternionIsNear1 ( )

Definition at line 393 of file TestQuaternion.cpp.

◆ ZeroQuaternionIsAsExpected()

void ZeroQuaternionIsAsExpected ( )

Definition at line 62 of file TestQuaternion.cpp.