[name]

4D vector.

Constructor

[name]( [page:Float x], [page:Float y], [page:Float z], [page:Float w] )

x -- todo
y -- todo
z -- todo
w -- todo
todo

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 v] ) [page:Vector4]

Adds *v* to this vector.

.addVectors( [page:Vector4 a], [page:Vector4 b] ) [page:Vector4]

Sets this vector to *a + b*.

.sub( [page:Vector4 v] ) [page:Vector4]

Subtracts *v* from this vector.

.subVectors( [page:Vector4 a], [page:Vector4 b] ) [page:Vector4]

Sets this vector to *a - b*.

.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:Vector4]

Normalizes this vector and multiplies it by *l*.

.lerp( [page:Vector4 v], [page:Float alpha] ) [page:Vector4]

Linearly interpolate between this vector and *v* with *alpha* factor.

.clone() [page:Vector4]

Clones this vector.

.clamp([page:todo min], [page:todo max]) [page:todo]

min -- todo
max -- todo
todo

.toArray() [page:todo]

todo

.applyMatrix4([page:todo m]) [page:todo]

m -- todo
todo

.min([page:todo v]) [page:todo]

v -- todo
todo

.max([page:todo v]) [page:todo]

v -- todo
todo

.setAxisAngleFromRotationMatrix([page:todo m]) [page:todo]

m -- todo
todo

.addScalar([page:todo s]) [page:todo]

s -- todo
todo

.equals([page:todo v]) [page:todo]

v -- todo
todo

.setAxisAngleFromQuaternion([page:todo q]) [page:todo]

q -- todo
todo

.setW([page:todo w]) [page:todo]

w -- todo
todo

.getComponent([page:todo index]) [page:todo]

index -- todo
todo

.fromArray([page:todo array]) [page:todo]

array -- todo
todo

.lengthManhattan() [page:todo]

todo

.setComponent([page:todo index], [page:todo value]) [page:todo]

index -- todo
value -- todo
todo

.setX([page:todo x]) [page:todo]

x -- todo
todo

.setY([page:todo y]) [page:todo]

y -- todo
todo

.setZ([page:todo z]) [page:todo]

z -- todo
todo

Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]