[name]
4D vector.
Constructor
[name]( [page:Float x], [page:Float y], [page:Float z], [page:Float w] )
Properties
.[page:Float x]
.[page:Float y]
.[page:Float z]
.[page:Float w]
Methods
.set( [page:Float x], [page:Float y], [page:Float z], [page:Float w] ) [page:Vector4]
Sets value of this vector.
.copy( [page:Vector4 v] ) [page:Vector4]
Copies value of *v* to this vector.
.add( [page:Vector4 a], [page:Vector4 b] ) [page:Vector4]
Sets this vector to *a + b*.
.addSelf( [page:Vector4 v] ) [page:Vector4s]
Adds *v* to this vector.
.sub( [page:Vector4 a], [page:Vector4 b] ) [page:Vector4]
Sets this vector to *a - b*.
.subSelf( [page:Vector4 v] ) [page:Vector4]
Subtracts *v* from this vector.
.multiplyScalar( [page:Float s] ) [page:Vector4]
Multiplies this vector by scalar *s*.
.divideScalar( [page:Float s] ) [page:Vector4]
Divides this vector by scalar *s*.
Set vector to *( 0, 0, 0 )* if *s == 0*.
.negate() [page:Vector4]
Inverts this vector.
.dot( [page:Vector4 v] ) [page:Float]
Computes dot product of this vector and *v*.
.lengthSq() [page:Float]
Computes squared length of this vector.
.length() [page:Float]
Computes length of this vector.
.normalize() [page:Vector4]
Normalizes this vector.
.setLength( [page:Float l] ) [page:Vector3]
Normalizes this vector and multiplies it by *l*.
.lerpSelf( [page:Vector4 v], [page:Float alpha] ) [page:Vector4]
Linearly interpolate between this vector and *v* with *alpha* factor.
.clone() [page:Vector3]
Clones this vector.
Source
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]