FlxVector の変更点


[[flixel.util]]
[[API Reference]] > [[flixel.math]] > FlxVector

* FlxVector [#r0781252]
2次元ベクトルクラスです。

----
#contents
----

* 定数 [#w95a1c02]
** EPSILON:Float = 0.0000001 : 最小値(この値より小さい場合は0とみなす) [#x720c810]
** EPSILON_SQUARED:Float = EPSILON * EPSILON : 最小値の自乗 [#n0890c5a]

----
* staticメソッド [#v77c7ad0]
** get() : FlxVectorのインスタンスを取得します [#ccc686c1]
- 引数
-- X:Float : X値
-- Y:Float : Y値
- 戻り値:FlxVector : オブジェクトプールから取得したFlxVector

----
* フィールド [#ya078a72]
** dx:Float : 正規化したX値 [#fd7dc101]
** dy:Float : 正規化したY値 [#v70475ba]
** length:Float : 距離 [#i1138175]
** lengthSquared:Float : 距離の自乗 [#lbee451f]
** degrees:Float : ベクトルの角度 [#t17b0eed]
** radians:Float : ベクトルのラジアン [#dd15df83]
** rx:Float : ベクトルの右側の法線の水平成分 [#saf08739]
** ry:Float : ベクトルの右側の法線の垂直成分 [#f18a1ac6]
** lx:Float : ベクトルの左側の法線の水平成分 [#j9da6fa7]
** ly:Float : ベクトルの左側の法線の垂直成分 [#u8f9264b]
* メソッド [#uadab2de]
** put() : 現在のインスタンスをオブジェクトプールへ返却します [#p6ebd425]
- 戻り値:Void
** set() : XY座標の値を設定します [#d41bdf07]
- 引数
-- X:Float = 0 : X座標
-- Y:Float = 0 : Y座標
- 戻り値:FlxVector : thisポインタ
** scale() : 各成分の値をスケールします [#o8bb6ec9]
- 引数
-- k:Float : スケール値
- 戻り値:FlxVector : thisポインタ
** scaleNew() : 各成分の値をスケールして新しいFlxVectorを返します [#d92b607d]
- 引数
-- k:Float : スケール値
- 戻り値:FlxVector : 新しく作成したFlxVector
** addNew() : 渡されたFlxVectorの値を加算し、新しいFlxVectorを返します [#s1e0eab4]
- 引数
-- v:FlxVector : 加算するFlxVector
- 戻り値:FlxVector : 新しく作成したFlxVector
** subtractNew() : 渡されたFlxVectorの値を減算し、新しいFlxVectorを返します [#yba23268]
- 引数
-- v:FlxVector : 減算するFlxVector
- 戻り値:FlxVector : 新しく作成したFlxVector
** dotProduct() : 指定のベクトルとの内積を求めます [#r36874bf]
- 引数
-- v:FlxVector : 掛け合わせるベクトル
- 戻り値:Float : 内積の値
** dotProdWithNormalizing() : 指定のベクトルを正規化したものとの内積を求めます [#bb793377]
- 引数
-- v:FlxVector : 掛け合わせるベクトル
- 戻り値:Float : 内積の値
** isPerpendicular() : 指定のベクトルが垂直に交わっているかどうかを調べます [#ab1603fa]
- 引数
-- v:FlxVector : チェックするベクトル
- 戻り値:Bool : 垂直に交わっていればtrue
** crossProductLength() : 指定のベクトルのとの外積の長さを求めます [#q8b3df1a]
- 引数
-- v:FlxVector : 掛け合わせるベクトル
- 戻り値:Float : 外積の長さ
** isParallel() : 指定のベクトルが平行かどうかを調べます [#ubd3d1d3]
-- v:FlxVector : チェックするベクトル
- 戻り値:Bool : 平行であればtrue
** isZero() : ベクトルの長さが0であるかどうかを調べます [#u61f6077]
- 戻り値:Bool : 0であればtrue
** zero() : ベクトルを0にします [#xc573d2c]
- 戻り値:Void
** normalize() : ベクトルを正規化します [#r98066f3]
- 戻り値:Void
** isNormalized() : ベクトルが正規化済みかどうかを調べます [#z307046d]
- 戻り値:Bool : 正規化済みであればtrue
** equal() : 指定のベクトルが一致しているかどうかを調べます [#e13153cc]
-- v:FlxVector : チェックするベクトル
- 戻り値:Bool : 一致していればtrue
** rotateByRadians() : ベクトルを回転します(ラジアン指定) [#p2a52ebc]
- 引数
-- rads:Float : 回転させるラジアン
- 戻り値:FlxVector : thisポインタ
** rotateByDegrees() : ベクトルを回転します(角度指定) [#g3e7f0fd]
- 引数
-- degs:Float : 回転させる角度
- 戻り値:FlxVector : thisポインタ
** negate() : 符号を反転します [#lf20653e]
- 戻り値:FlxVector : thisポインタ
** negateNew() : 符号を反転したベクトルを新たに生成します [#j29a57f2]
- 戻り値:FlxVector : 新しく生成したFlxVector