1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 17:24:20 +02:00
This commit is contained in:
Justin Lin
2020-06-14 10:32:16 +08:00
parent 8b60a3b132
commit a51d981b8d
3 changed files with 49 additions and 2 deletions

View File

@@ -231,7 +231,7 @@ See [examples](examples).
- [voxel/vx_difference](https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_difference.html) - [voxel/vx_difference](https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_difference.html)
### Matrix ### Matrix
- matrix/m_determinant - [matrix/m_determinant](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_determinant.html)
### Voronoi ### Voronoi
- voronoi/vrn2_from - voronoi/vrn2_from

View File

@@ -0,0 +1,37 @@
# m_determinant
It can calculate a determinant, a special number that can be calculated from a square matrix.
**Since:** 2.4
## Parameters
- `m` : A square matrix.
## Examples
use <matrix/m_determinant.scad>;
assert(
m_determinant([
[3, 8],
[4, 6]
]) == -14
);
assert(
m_determinant([
[6, 1, 1],
[4, -2, 5],
[2, 8, 7]
]) == -306
);
assert(
m_determinant([
[0, 4, 0, -3],
[1, 1, 5, 2],
[1, -2, 0, 6],
[3, 0, 0, 1]
]) == -250
);

View File

@@ -1,3 +1,13 @@
/**
* m_determinant.scad
*
* @copyright Justin Lin, 2019
* @license https://opensource.org/licenses/lgpl-3.0.html
*
* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-m_determinant.html
*
**/
use <_impl/_m_determinant_impl.scad>; use <_impl/_m_determinant_impl.scad>;
function m_determinant(matrix) = _m_determinant(matrix); function m_determinant(m) = _m_determinant(m);