Class: Lumino::Vector2

Inherits:
Object
  • Object
show all
Defined in:
LuminoRubyDoc.rb

Overview

2次元のベクトルのクラスです。

Instance Method Summary (collapse)

Constructor Details

- (Vector2) initialize(x, y)

初期化

Parameters:

  • x (Float)
  • y (Float)


564
565
# File 'LuminoRubyDoc.rb', line 564

def initialize
end

Instance Method Details

- (Float) length

2D ベクトルの長さを取得します。

Returns:

  • (Float)

    ベクトルの長さを格納する変数



594
595
# File 'LuminoRubyDoc.rb', line 594

def length
end

- (Lumino::Vector2) normalize(vec) - (Lumino::Vector2) normalize

2D ベクトルを正規化します。

Overloads:

Returns:



614
615
# File 'LuminoRubyDoc.rb', line 614

def normalize
end

- (Object) set(x, y)

2D ベクトルに値を設定します。

Parameters:

  • x (Float)

    X 値

  • y (Float)

    Y 値



605
606
# File 'LuminoRubyDoc.rb', line 605

def set
end

- (Float) square_length

2D ベクトルの長さの2乗を取得します。

Returns:

  • (Float)

    ベクトルの長さの2乗を格納する変数



599
600
# File 'LuminoRubyDoc.rb', line 599

def square_length
end

- (Float) x

Returns:

  • (Float)


576
577
# File 'LuminoRubyDoc.rb', line 576

def x
end

- (Object) x=(v)

Parameters:

  • v (Float)


570
571
# File 'LuminoRubyDoc.rb', line 570

def x=(v)
end

- (Float) y

Returns:

  • (Float)


588
589
# File 'LuminoRubyDoc.rb', line 588

def y
end

- (Object) y=(v)

Parameters:

  • v (Float)


582
583
# File 'LuminoRubyDoc.rb', line 582

def y=(v)
end