- Preparing search index...
- The search index is not available
ella-math
Constructors
constructor
- new Vec(...values: number[]): Vec
-
Returns Vec
Properties
Readonly
values
values: number[]
Accessors
dim
- get dim(): number
-
Returns number
length
- get length(): number
-
Returns number
normalized
- get normalized(): Vec
-
Returns Vec
sqrLength
- get sqrLength(): number
-
Returns number
w
- get w(): number
-
Returns number
x
- get x(): number
-
Returns number
y
- get y(): number
-
Returns number
z
- get z(): number
-
Returns number
Methods
div
- div(value: number): Vec
-
Returns Vec
dot
- dot(otherVec: Vec): number
-
Returns number
equals
- equals(otherVec: Vec): boolean
-
Returns boolean
isNullVector
- isNullVector(): boolean
-
Returns boolean
lerp
- lerp(otherVec: Vec, a: number): Vec
-
Returns Vec
mul
- mul(value: number): Vec
-
Returns Vec
toArray
- toArray(): number[]
-
Returns number[]
toString
- toString(): string
-
Returns string
Static
fromArray
- fromArray(arr: number[]): Vec
-
Returns Vec
Static
fromNumber
- fromNumber(n: number, dim: number): Vec
-
Returns Vec
Calculate length