Просмотр исходного кода

Add Quaternion._conjugate()

customisations
alemart 11 месяцев назад
Родитель
Сommit
ead82a413a
1 измененных файлов: 14 добавлений и 0 удалений
  1. 14
    0
      src/geometry/quaternion.ts

+ 14
- 0
src/geometry/quaternion.ts Просмотреть файл

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
      * Copy q to this
150
      * Copy q to this
137
      * @param q a quaternion
151
      * @param q a quaternion
138
      * @returns this quaternion
152
      * @returns this quaternion

Загрузка…
Отмена
Сохранить