vector2
概要
二次元ベクトルを扱う関数。
クラス
二次元ベクトルクラス
関数一覧
コンストラクタ
table:_
関数 概要
vector2.new
数値を指定してベクトルを取得
vector2.identity
単位ベクトル
vector2.up
ベクトル (0,1)
vector2.down
ベクトル (0,-1)
vector2.right
ベクトル (1,0)
vector2.left
ベクトル (-1,0)
vector2.one
すべての要素が1のベクトル
vector2.zero
すべての要素が0のベクトル
メンバアクセス
table:_
関数 概要
vector2.x
ベクトルのX値を取得 / 設定
vector2.y
ベクトルのY値を取得 / 設定
演算
table:_
関数 概要
vector2.abs
ベクトルの絶対値
vector2.norm
ベクトルのノルム
vector2.normalize
ベクトルの正規化
vector2.dot
ベクトルの内積
vector2.scale
ベクトル成分の積
vector2.distance
ベクトルの距離
vector2.conj
ベクトルの共役
vector2.table
ベクトルをテーブルに変換
vector2.complex
ベクトルを複素数に変換
vector2.vector3
二次元ベクトルを三次元ベクトルに変換
vector2.vector4
二次元ベクトルを四次元ベクトルに変換
#API
#グローバルAPI