Class: Tuile::Point
- Inherits:
-
Object
- Object
- Tuile::Point
- Defined in:
- lib/tuile/point.rb
Overview
A point with ‘x` and `y` integer coordinates, both 0-based.
Instance Attribute Summary collapse
-
#x ⇒ Integer
readonly
X coordinate, 0-based.
-
#y ⇒ Integer
readonly
Y coordinate, 0-based.
Instance Method Summary collapse
Instance Attribute Details
#x ⇒ Integer (readonly)
Returns x coordinate, 0-based.
10 11 12 13 |
# File 'lib/tuile/point.rb', line 10 class Point < Data.define(:x, :y) # @return [String] def to_s = "#{x},#{y}" end |
#y ⇒ Integer (readonly)
Returns y coordinate, 0-based.
10 11 12 13 |
# File 'lib/tuile/point.rb', line 10 class Point < Data.define(:x, :y) # @return [String] def to_s = "#{x},#{y}" end |
Instance Method Details
#to_s ⇒ String
12 |
# File 'lib/tuile/point.rb', line 12 def to_s = "#{x},#{y}" |