StumpyCore::Point
Inherits Struct / Value / Object
Constructors
new(x : Float64, y : Float64)
Class methods
distance(p1 : Point, p2 : Point)
parse(s)
unit
x_unit
y_unit
Instance methods
*(scalar : Float64)
*(other : Point)
+(other : Point)
+(other : Float64)
-(other)
/(scalar)
distance(other : Point)
mag
normalize
to_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO) which can be overridden for custom implementations.
Also see #inspect.
x
y