Class: Tuile::Point

Inherits:
Object
  • Object
show all
Defined in:
lib/tuile/point.rb

Overview

A point with ‘x` and `y` integer coordinates, both 0-based.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#xInteger (readonly)

Returns x coordinate, 0-based.

Returns:

  • (Integer)

    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

#yInteger (readonly)

Returns y coordinate, 0-based.

Returns:

  • (Integer)

    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_sString

Returns:

  • (String)


12
# File 'lib/tuile/point.rb', line 12

def to_s = "#{x},#{y}"