Class: Charming::Projectile::Vector
- Inherits:
-
Data
- Object
- Data
- Charming::Projectile::Vector
- Defined in:
- lib/charming/projectile.rb
Instance Attribute Summary collapse
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
-
#z ⇒ Object
readonly
Returns the value of attribute z.
Instance Method Summary collapse
-
#initialize(x:, y:, z: 0.0) ⇒ Vector
constructor
A new instance of Vector.
Constructor Details
#initialize(x:, y:, z: 0.0) ⇒ Vector
Returns a new instance of Vector.
24 25 26 |
# File 'lib/charming/projectile.rb', line 24 def initialize(x:, y:, z: 0.0) super end |
Instance Attribute Details
#x ⇒ Object (readonly)
Returns the value of attribute x
23 24 25 |
# File 'lib/charming/projectile.rb', line 23 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y
23 24 25 |
# File 'lib/charming/projectile.rb', line 23 def y @y end |
#z ⇒ Object (readonly)
Returns the value of attribute z
23 24 25 |
# File 'lib/charming/projectile.rb', line 23 def z @z end |