1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-11 09:53:58 +02:00

Typo in comment fixed.

This commit is contained in:
Chris
2023-07-22 19:32:42 +01:00
parent 3c370359c8
commit 09d2ffb126
2 changed files with 2 additions and 2 deletions

View File

@@ -104,7 +104,7 @@ function reverse(v) = let(n = len(v) - 1) n < 0 ? [] : [for(i = [0 : n]) v[n - i
function angle_between(v1, v2) = acos(v1 * v2 / (norm(v1) * norm(v2))); //! Return the angle between two vectors
// http://eecs.qmul.ac.uk/~gslabaugh/publications/euler.pdf
function euler(R) = let(ay = asin(-R[2][0]), cy = cos(ay)) //! Convert a rotation matrix to a Euler rotation vector.
function euler(R) = let(ay = asin(-R[2][0]), cy = cos(ay)) //! Convert a rotation matrix to an Euler rotation vector.
cy ? [ atan2(R[2][1] / cy, R[2][2] / cy), ay, atan2(R[1][0] / cy, R[0][0] / cy) ]
: R[2][0] < 0 ? [atan2( R[0][1], R[0][2]), 90, 0]
: [atan2(-R[0][1], -R[0][2]), -90, 0];