Class: Tuile::Point
- Inherits:
-
Object
- Object
- Tuile::Point
- Defined in:
- lib/tuile/point.rb,
sig/tuile.rbs
Overview
A point with x and y integer coordinates, both 0-based.
Instance Attribute Summary collapse
-
#x ⇒ Integer
readonly
@return — x coordinate, 0-based.
-
#y ⇒ Integer
readonly
@return — y coordinate, 0-based.
Instance Method Summary collapse
Instance Attribute Details
#x ⇒ Integer (readonly)
@return — 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)
@return — 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}" |