Skip to main content

Vector1

Vector1

Kind: global class
Properties

NameType
xnumber

new Vector1([x])

ParamTypeDefault
[x]number0

vector1.isVector1 : boolean

Kind: instance property of Vector1
Read only: true

vector1.valueOf() ⇒ number

Inherited from Number class

Kind: instance method of Vector1

vector1.toString() ⇒ string

Kind: instance method of Vector1

vector1.getValue() ⇒ number

Kind: instance method of Vector1

vector1.compareTo(other) ⇒ number

Kind: instance method of Vector1

ParamType
otherVector1

vector1.set(x) ⇒ Vector1

Kind: instance method of Vector1

ParamType
xnumber

vector1.setSilent(x)

Set value without triggering #onChanged signal

Kind: instance method of Vector1

ParamType
xnumber

vector1.isZero() ⇒ boolean

Kind: instance method of Vector1

vector1._add(v) ⇒ Vector1

Kind: instance method of Vector1

ParamType
vNumber

vector1.add(other)

Kind: instance method of Vector1

ParamType
otherVector1 | Vector2 | Vector3 | Vector4

vector1._sub(v) ⇒ Vector1

Kind: instance method of Vector1

ParamType
vNumber

vector1.sub(other) ⇒ Vector1

Kind: instance method of Vector1

ParamType
otherVector1

vector1.multiply(other) ⇒ Vector1

Kind: instance method of Vector1

ParamType
otherVector1

vector1.multiplyScalar(v)

Kind: instance method of Vector1

ParamType
vnumber

vector1.clamp(low, high) ⇒ Vector1

Kind: instance method of Vector1

ParamType
lownumber
highnumber

vector1.negate()

Negate sign of the value, if value is 7, it will become -7 and vice versa Zero is unaffected

Kind: instance method of Vector1

vector1.copy(other)

Kind: instance method of Vector1

ParamType
otherVector1 | Vector2 | Vector3 | Vector4

vector1.clone() ⇒ Vector1

Kind: instance method of Vector1

vector1.equals(other) ⇒ boolean

Kind: instance method of Vector1

ParamType
otherVector1

vector1.hash() ⇒ number

Kind: instance method of Vector1

vector1.process(handler)

Kind: instance method of Vector1

ParamType
handlerfunction

vector1.readFromArray(array, offset)

Kind: instance method of Vector1

ParamTypeDefault
arrayArray.<number>
offsetnumber0

vector1.writeToArray(array, offset)

Kind: instance method of Vector1

ParamTypeDefault
arrayArray.<number>
offsetnumber0

vector1.toBinaryBuffer(buffer)

Kind: instance method of Vector1

ParamType
bufferBinaryBuffer

vector1.fromBinaryBuffer(buffer)

Kind: instance method of Vector1

ParamType
bufferBinaryBuffer

Vector1.zero : Vector1

Kind: static property of Vector1
Read only: true

Vector1.one : Vector1

Kind: static property of Vector1
Read only: true

Vector1.compare(a, b) ⇒ number

Kind: static method of Vector1

ParamType
aVector1
bVector1