diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /vphysics/linear_solver.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'vphysics/linear_solver.h')
| -rw-r--r-- | vphysics/linear_solver.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vphysics/linear_solver.h b/vphysics/linear_solver.h new file mode 100644 index 0000000..1995ed9 --- /dev/null +++ b/vphysics/linear_solver.h @@ -0,0 +1,22 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef LINEAR_SOLVER_H +#define LINEAR_SOLVER_H +#ifdef _WIN32 +#pragma once +#endif + + +// Take the determinant of a matrix. +// NOTE: ONLY SUPPORTS 2x2, 3x3, and 4x4 +extern float Det( float *matrix, int rows ); + +// solve a system of linear equations using Cramer's rule (only supports up to 4 variables due to limits on Det()) +extern float *SolveCramer( const float *matrix, int rows, int columns ); + +#endif // LINEAR_SOLVER_H |