Vector1
Vector1
Kind: global class
Properties
| Name | Type |
|---|---|
| x | number |
- Vector1
- new Vector1([x])
- instance
- .isVector1 :
boolean - .valueOf() ⇒
number - .toString() ⇒
string - .getValue() ⇒
number - .compareTo(other) ⇒
number - .set(x) ⇒
Vector1 - .setSilent(x)
- .isZero() ⇒
boolean - ._add(v) ⇒
Vector1 - .add(other)
- ._sub(v) ⇒
Vector1 - .sub(other) ⇒
Vector1 - .multiply(other) ⇒
Vector1 - .multiplyScalar(v)
- .clamp(low, high) ⇒
Vector1 - .negate()
- .copy(other)
- .clone() ⇒
Vector1 - .equals(other) ⇒
boolean - .hash() ⇒
number - .process(handler)
- .readFromArray(array, offset)
- .writeToArray(array, offset)
- .toBinaryBuffer(buffer)
- .fromBinaryBuffer(buffer)
- .isVector1 :
- static
- .zero :
Vector1 - .one :
Vector1 - .compare(a, b) ⇒
number
- .zero :
new Vector1([x])
| Param | Type | Default |
|---|---|---|
| [x] | number | 0 |
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
| Param | Type |
|---|---|
| other | Vector1 |
vector1.set(x) ⇒ Vector1
Kind: instance method of Vector1
| Param | Type |
|---|---|
| x | number |
vector1.setSilent(x)
Set value without triggering #onChanged signal
Kind: instance method of Vector1
| Param | Type |
|---|---|
| x | number |
vector1.isZero() ⇒ boolean
Kind: instance method of Vector1
vector1._add(v) ⇒ Vector1
Kind: instance method of Vector1
| Param | Type |
|---|---|
| v | Number |
vector1.add(other)
Kind: instance method of Vector1
| Param | Type |
|---|---|
| other | Vector1 | Vector2 | Vector3 | Vector4 |
vector1._sub(v) ⇒ Vector1
Kind: instance method of Vector1
| Param | Type |
|---|---|
| v | Number |
vector1.sub(other) ⇒ Vector1
Kind: instance method of Vector1
| Param | Type |
|---|---|
| other | Vector1 |
vector1.multiply(other) ⇒ Vector1
Kind: instance method of Vector1
| Param | Type |
|---|---|
| other | Vector1 |
vector1.multiplyScalar(v)
Kind: instance method of Vector1
| Param | Type |
|---|---|
| v | number |
vector1.clamp(low, high) ⇒ Vector1
Kind: instance method of Vector1
| Param | Type |
|---|---|
| low | number |
| high | number |
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
| Param | Type |
|---|---|
| other | Vector1 | Vector2 | Vector3 | Vector4 |
vector1.clone() ⇒ Vector1
Kind: instance method of Vector1
vector1.equals(other) ⇒ boolean
Kind: instance method of Vector1
| Param | Type |
|---|---|
| other | Vector1 |
vector1.hash() ⇒ number
Kind: instance method of Vector1
vector1.process(handler)
Kind: instance method of Vector1
| Param | Type |
|---|---|
| handler | function |
vector1.readFromArray(array, offset)
Kind: instance method of Vector1
| Param | Type | Default |
|---|---|---|
| array | Array.<number> | |
| offset | number | 0 |
vector1.writeToArray(array, offset)
Kind: instance method of Vector1
| Param | Type | Default |
|---|---|---|
| array | Array.<number> | |
| offset | number | 0 |
vector1.toBinaryBuffer(buffer)
Kind: instance method of Vector1
| Param | Type |
|---|---|
| buffer | BinaryBuffer |
vector1.fromBinaryBuffer(buffer)
Kind: instance method of Vector1
| Param | Type |
|---|---|
| buffer | BinaryBuffer |
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
| Param | Type |
|---|---|
| a | Vector1 |
| b | Vector1 |