mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-02-25 10:03:02 +01:00
use scad
This commit is contained in:
parent
66a97cf5d9
commit
00b3d95c32
8
src/matrix/_impl/_m_cumulate_impl.scad
Normal file
8
src/matrix/_impl/_m_cumulate_impl.scad
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
function _m_cumulate(matrice, i) =
|
||||||
|
i == len(matrice) - 2 ?
|
||||||
|
matrice[i] * matrice[i + 1] :
|
||||||
|
matrice[i] * _m_cumulate(matrice, i + 1);
|
||||||
|
|
||||||
|
function _m_cumulate_impl(matrice) =
|
||||||
|
len(matrice) == 1 ? matrice[0] : _m_cumulate(matrice, 0);
|
||||||
|
|
@ -8,11 +8,7 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
function _m_cumulate(matrice, i) =
|
use <matrix/_impl/_m_cumulate_impl.scad>;
|
||||||
i == len(matrice) - 2 ?
|
|
||||||
matrice[i] * matrice[i + 1] :
|
|
||||||
matrice[i] * _m_cumulate(matrice, i + 1);
|
|
||||||
|
|
||||||
function m_cumulate(matrice) =
|
function m_cumulate(matrice) = _m_cumulate_impl(matrice);
|
||||||
len(matrice) == 1 ? matrice[0] : _m_cumulate(matrice, 0);
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user