Class: MG::Point

Inherits:
Object
  • Object
show all
Defined in:
doc/API_reference.rb

Overview

node.location = point

Properties collapse

Helpers collapse

Instance Attribute Details

#xFloat

Returns the x coordinate of the point.

Returns:

  • (Float)

    the x coordinate of the point.



1042
1043
1044
# File 'doc/API_reference.rb', line 1042

def x
  @x
end

#yFloat

Returns the y coordinate of the point.

Returns:

  • (Float)

    the y coordinate of the point.



1045
1046
1047
# File 'doc/API_reference.rb', line 1045

def y
  @y
end

Instance Method Details

#+(point) ⇒ Point

Adds the coordinates of the receiver with the coordinates of the given point object.

Parameters:

Returns:

  • (Point)

    A new Point object.



1054
# File 'doc/API_reference.rb', line 1054

def +(point); end

#-(point) ⇒ Point

Substracts the coordinates of the receiver with the coordinates of the given point object.

Parameters:

Returns:

  • (Point)

    A new Point object.



1060
# File 'doc/API_reference.rb', line 1060

def -(point); end