Add Vector4.multiply()
@@ -241,6 +241,9 @@
that value with the corresponding min value.
</p>
+ <h3>[method:this multiply]( [param:Vector4 v] )</h3>
+ <p>Multiplies this vector by [page:Vector4 v].</p>
+
<h3>[method:this multiplyScalar]( [param:Float s] )</h3>
<p>Multiplies this vector by scalar [page:Float s].</p>
@@ -240,6 +240,9 @@
则将该值替换为对应的最小值。
+ <p>将该向量与所传入的向量[page:Vector4 v]进行相乘。</p>
<p>将该向量与所传入的标量[page:Float s]进行相乘。</p>
@@ -107,6 +107,8 @@ export class Vector4 implements Vector {
*/
subVectors( a: Vector4, b: Vector4 ): this;
+ multiply( v: Vector4 ): this;
/**
* Multiplies this vector by scalar s.
@@ -227,6 +227,17 @@ class Vector4 {
}
+ multiply( v ) {
+ this.x *= v.x;
+ this.y *= v.y;
+ this.z *= v.z;
+ this.w *= v.w;
+ return this;
+ }
multiplyScalar( scalar ) {
this.x *= scalar;