Nugget
Bare-metal libraries and examples for the original PlayStation
Loading...
Searching...
No Matches
Functions
test-soft-math.cpp File Reference
#include "psyqo/soft-math.hh"
#include "snitch_all.hpp"
Include dependency graph for test-soft-math.cpp:

Functions

 TEST_CASE ("Rotation matrix at angle 0 is identity")
 
 TEST_CASE ("Rotation matrix Y-axis at 0 is identity")
 
 TEST_CASE ("Rotation matrix Z-axis at 0 is identity")
 
 TEST_CASE ("Matrix multiply with identity")
 
 TEST_CASE ("Identity matrix * vector = vector")
 
 TEST_CASE ("Matrix-vector XY extraction")
 
 TEST_CASE ("Matrix-vector Z extraction")
 
 TEST_CASE ("Cross product of basis vectors")
 
 TEST_CASE ("Cross product anti-commutativity")
 
 TEST_CASE ("Cross product of parallel vectors is zero")
 
 TEST_CASE ("Identity matrix determinant is 1")
 
 TEST_CASE ("Rotation matrix determinant is 1")
 
 TEST_CASE ("Square root of 4 is 2")
 
 TEST_CASE ("Square root of 1 is 1")
 
 TEST_CASE ("Square root of 9 is 3")
 
 TEST_CASE ("Norm of unit vectors is 1")
 
 TEST_CASE ("Norm of (3, 4, 0) is 5")
 
 TEST_CASE ("Normalized vector has unit length")
 
 TEST_CASE ("Matrix scale")
 
 TEST_CASE ("Perspective projection")
 
 TEST_CASE ("SoftMath normalizeVec3 survives short vectors")
 
 TEST_CASE ("SoftMath fastNormalizeVec3 survives short vectors")
 
 TEST_CASE ("inverseSquareRoot for x >= 1 is within 33/64 of a raw unit")
 
 TEST_CASE ("inverseSquareRoot for x >= 1 does not depend on a good hint")
 
 TEST_CASE ("inverseSquareRoot of a near-unit squared length")
 
 TEST_CASE ("squareRoot is within 33/64 of a raw unit")
 

Function Documentation

◆ TEST_CASE() [1/26]

TEST_CASE ( "Cross product anti-commutativity"  )

◆ TEST_CASE() [2/26]

TEST_CASE ( "Cross product of basis vectors"  )

◆ TEST_CASE() [3/26]

TEST_CASE ( "Cross product of parallel vectors is zero"  )

◆ TEST_CASE() [4/26]

TEST_CASE ( )

◆ TEST_CASE() [5/26]

TEST_CASE ( "Identity matrix determinant is 1"  )

◆ TEST_CASE() [6/26]

TEST_CASE ( "inverseSquareRoot for x >= 1 does not depend on a good hint"  )

◆ TEST_CASE() [7/26]

TEST_CASE ( "inverseSquareRoot for x >= 1 is within 33/64 of a raw unit"  )

◆ TEST_CASE() [8/26]

TEST_CASE ( "inverseSquareRoot of a near-unit squared length"  )

◆ TEST_CASE() [9/26]

TEST_CASE ( "Matrix multiply with identity"  )

◆ TEST_CASE() [10/26]

TEST_CASE ( "Matrix scale"  )

◆ TEST_CASE() [11/26]

TEST_CASE ( "Matrix-vector XY extraction"  )

◆ TEST_CASE() [12/26]

TEST_CASE ( "Matrix-vector Z extraction"  )

◆ TEST_CASE() [13/26]

TEST_CASE ( "Norm of (3, 4, 0) is 5"  )

◆ TEST_CASE() [14/26]

TEST_CASE ( "Norm of unit vectors is 1"  )

◆ TEST_CASE() [15/26]

TEST_CASE ( "Normalized vector has unit length"  )

◆ TEST_CASE() [16/26]

TEST_CASE ( "Perspective projection"  )

◆ TEST_CASE() [17/26]

TEST_CASE ( "Rotation matrix at angle 0 is identity"  )

◆ TEST_CASE() [18/26]

TEST_CASE ( "Rotation matrix determinant is 1"  )

◆ TEST_CASE() [19/26]

TEST_CASE ( "Rotation matrix Y-axis at 0 is identity"  )

◆ TEST_CASE() [20/26]

TEST_CASE ( "Rotation matrix Z-axis at 0 is identity"  )

◆ TEST_CASE() [21/26]

TEST_CASE ( "SoftMath fastNormalizeVec3 survives short vectors"  )

◆ TEST_CASE() [22/26]

TEST_CASE ( "SoftMath normalizeVec3 survives short vectors"  )

◆ TEST_CASE() [23/26]

TEST_CASE ( "Square root of 1 is 1"  )

◆ TEST_CASE() [24/26]

TEST_CASE ( "Square root of 4 is 2"  )

◆ TEST_CASE() [25/26]

TEST_CASE ( "Square root of 9 is 3"  )

◆ TEST_CASE() [26/26]

TEST_CASE ( "squareRoot is within 33/64 of a raw unit"  )