Class: Coordinates

Inherits:
Object
  • Object
show all
Defined in:
lib/software_challenge_client/coordinates.rb

Overview

Ein Koordinatenpaar für ein zweidimensionales Koordinatensystem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x, y) ⇒ Coordinates

Erstellt ein neues Koordinatenpaar aus X- und Y-Koordinate.


13
14
15
16
# File 'lib/software_challenge_client/coordinates.rb', line 13

def initialize(x, y)
  @x = x
  @y = y
end

Instance Attribute Details

#xObject (readonly)

X-Koordinate


8
9
10
# File 'lib/software_challenge_client/coordinates.rb', line 8

def x
  @x
end

#yObject (readonly)

Y-Koordinate


10
11
12
# File 'lib/software_challenge_client/coordinates.rb', line 10

def y
  @y
end