Class: Charming::Projectile::Point

Inherits:
Data
  • Object
show all
Defined in:
lib/charming/projectile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x:, y:, z: 0.0) ⇒ Point

Returns a new instance of Point.



18
19
20
# File 'lib/charming/projectile.rb', line 18

def initialize(x:, y:, z: 0.0)
  super
end

Instance Attribute Details

#xObject (readonly)

Returns the value of attribute x

Returns:

  • (Object)

    the current value of x



17
18
19
# File 'lib/charming/projectile.rb', line 17

def x
  @x
end

#yObject (readonly)

Returns the value of attribute y

Returns:

  • (Object)

    the current value of y



17
18
19
# File 'lib/charming/projectile.rb', line 17

def y
  @y
end

#zObject (readonly)

Returns the value of attribute z

Returns:

  • (Object)

    the current value of z



17
18
19
# File 'lib/charming/projectile.rb', line 17

def z
  @z
end