vectorライブラリ
ライブラリ日本語解説は準備中
ひとことで言うと
vectorは、ロブロックス(Roblox)のライブラリです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。
公式の説明(英語):A library of vector functions.
プロパティ(2)
| 名前と書き方 | 説明 |
|---|---|
zerovector.zero: vector | Constant vector with all components set to 0. |
onevector.one: vector | Constant vector with all components set to 1. |
関数(14)
| 名前と書き方 | 説明 |
|---|---|
createvector.create(x: number, y: number, z: number): vector | Creates a new vector with the given component values. |
magnitudevector.magnitude(vec: vector): number | Calculates the magnitude of a given vector. |
normalizevector.normalize(vec: vector): vector | Computes the normalized version (unit vector) of a given vector. |
crossvector.cross(vec1: vector, vec2: vector): vector | Computes the cross product of two vectors. |
dotvector.dot(vec1: vector, vec2: vector): number | Computes the dot product of two vectors. |
anglevector.angle(vec1: vector, vec2: vector, axis: vector?): number | Computes the angle between two vectors in radians. |
floorvector.floor(vec: vector): vector | Applies Library.math.floor() to every component of the input vector. |
ceilvector.ceil(vec: vector): vector | Applies Library.math.ceil() to every component of the input vector. |
absvector.abs(vec: vector): vector | Applies Library.math.abs() to every component of the input vector. |
signvector.sign(vec: vector): vector | Applies Library.math.sign() to every component of the input vector. |
clampvector.clamp(vec: vector, min: vector, max: vector): vector | Applies Library.math.clamp() to every component of the input vector. |
lerpvector.lerp(vec1: vector, vec2: vector, alpha: number): vector | Returns a vector linearly interpolated between two vectors by a fractional alpha. |
maxvector.max(...: vector): vector | Applies Library.math.max() to the corresponding components of the input vectors. |
minvector.min(...: vector): vector | Applies Library.math.min() to the corresponding components of the input vectors. |
英語の説明とメンバーの一覧は、Roblox Creator Documentation(vector)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。