2d-vectors 中文文档教程
Vectors
具有以下实用程序的向量类:
Internal vars
this.x (float) 和 this.y (float)
Static methods
dotProduct
采用 (Vector, Vector)
返回浮点数
vectorFromIndex
(索引,宽度)
返回向量
linearInterpolation
(known, v1, v2)
返回浮点数
bilinearInterpolation
(goalV, dotProducts)
返回 linearInterpolation (float)
Prototype methods
magnitude
返回 float
normalize
返回归一化 Vector
subtract
takes (Vector)
返回 Vector
indexFromVector
占用(宽度) 返回浮动
Vectors
A vector class with the following utilities:
Internal vars
this.x (float) and this.y (float)
Static methods
dotProduct
takes (Vector, Vector)
returns float
vectorFromIndex
takes (index, width)
returns vector
linearInterpolation
takes (known, v1, v2)
returns float
bilinearInterpolation
takes (goalV, dotProducts)
returns a linearInterpolation (float)
Prototype methods
magnitude
returns float
normalize
returns normalized Vector
subtract
takes (Vector)
returns Vector
indexFromVector
takes (width) returns float