mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-16 12:24:09 +02:00
Update maths.scad
This commit is contained in:
@@ -192,11 +192,6 @@ function path_length(path, i = 0, length = 0) = //! Calculated the length along
|
||||
i >= len(path) - 1 ? length
|
||||
: path_length(path, i + 1, length + norm(path[i + 1] - path[i]));
|
||||
|
||||
function rotate_vector_2d(v, angle) = [
|
||||
v[0] * cos(angle) - v[1] * sin(angle),
|
||||
v[0] * sin(angle) + v[1] * cos(angle)
|
||||
];
|
||||
|
||||
function rotate_vector_2d(v, angle) = [
|
||||
v[0] * cos(angle) - v[1] * sin(angle),
|
||||
v[0] * sin(angle) + v[1] * cos(angle)
|
||||
@@ -219,4 +214,4 @@ function rotate_vector_3d(v, axis, angle) = let(
|
||||
mat[0][0]*v[0] + mat[0][1]*v[1] + mat[0][2]*v[2],
|
||||
mat[1][0]*v[0] + mat[1][1]*v[1] + mat[1][2]*v[2],
|
||||
mat[2][0]*v[0] + mat[2][1]*v[1] + mat[2][2]*v[2]
|
||||
];
|
||||
];
|
||||
|
Reference in New Issue
Block a user