Browse Source

Add Quaternion._conjugate()

customisations
alemart 10 months ago
parent
commit
ead82a413a
1 changed files with 14 additions and 0 deletions
  1. 14
    0
      src/geometry/quaternion.ts

+ 14
- 0
src/geometry/quaternion.ts View File

@@ -133,6 +133,20 @@ export class Quaternion
133 133
     }
134 134
 
135 135
     /**
136
+     * Conjugate this quaternion
137
+     * @returns this quaternion, conjugated
138
+     * @internal
139
+     */
140
+    _conjugate(): Quaternion
141
+    {
142
+        this.x = -this.x;
143
+        this.y = -this.y;
144
+        this.z = -this.z;
145
+
146
+        return this;
147
+    }
148
+
149
+    /**
136 150
      * Copy q to this
137 151
      * @param q a quaternion
138 152
      * @returns this quaternion

Loading…
Cancel
Save