vectorライブラリ

ライブラリ日本語解説は準備中

ひとことで言うと

vectorは、ロブロックス(Roblox)のライブラリです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。

公式の説明(英語):A library of vector functions.

プロパティ(2)

名前と書き方説明
zero
vector.zero: vector
Constant vector with all components set to 0.
one
vector.one: vector
Constant vector with all components set to 1.

関数(14)

名前と書き方説明
create
vector.create(x: number, y: number, z: number): vector
Creates a new vector with the given component values.
magnitude
vector.magnitude(vec: vector): number
Calculates the magnitude of a given vector.
normalize
vector.normalize(vec: vector): vector
Computes the normalized version (unit vector) of a given vector.
cross
vector.cross(vec1: vector, vec2: vector): vector
Computes the cross product of two vectors.
dot
vector.dot(vec1: vector, vec2: vector): number
Computes the dot product of two vectors.
angle
vector.angle(vec1: vector, vec2: vector, axis: vector?): number
Computes the angle between two vectors in radians.
floor
vector.floor(vec: vector): vector
Applies Library.math.floor() to every component of the input vector.
ceil
vector.ceil(vec: vector): vector
Applies Library.math.ceil() to every component of the input vector.
abs
vector.abs(vec: vector): vector
Applies Library.math.abs() to every component of the input vector.
sign
vector.sign(vec: vector): vector
Applies Library.math.sign() to every component of the input vector.
clamp
vector.clamp(vec: vector, min: vector, max: vector): vector
Applies Library.math.clamp() to every component of the input vector.
lerp
vector.lerp(vec1: vector, vec2: vector, alpha: number): vector
Returns a vector linearly interpolated between two vectors by a fractional alpha.
max
vector.max(...: vector): vector
Applies Library.math.max() to the corresponding components of the input vectors.
min
vector.min(...: vector): vector
Applies Library.math.min() to the corresponding components of the input vectors.

英語の説明とメンバーの一覧は、Roblox Creator Documentation(vector)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。沖縄マイクラ部 クロスウェーブで、ロブロックス(Roblox)・マインクラフト(マイクラ)・Scratchなどのプログラミングを指導。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにロブロックス(Roblox)やマインクラフト(マイクラ)のプログラミングを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む