Class: Tuile::Point

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#xInteger (readonly)

@return — x coordinate, 0-based.

Returns:

  • (Integer)


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)

@return — y coordinate, 0-based.

Returns:

  • (Integer)


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}"