Bläddra i källkod

Add Quaternion._conjugate()

customisations
alemart 10 månader sedan
förälder
incheckning
ead82a413a
1 ändrade filer med 14 tillägg och 0 borttagningar
  1. 14
    0
      src/geometry/quaternion.ts

+ 14
- 0
src/geometry/quaternion.ts Visa fil

@@ -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

Laddar…
Avbryt
Spara