class Lowess::Point

Attributes

x[R]
y[R]

Public Class Methods

new(x, y) click to toggle source
# File lib/lowess/point.rb, line 6
def initialize(x, y)
  @x = x.to_f
  @y = y.to_f
end

Public Instance Methods

<=>(p2) click to toggle source
# File lib/lowess/point.rb, line 11
def <=>(p2)
  if x != p2.x
    x <=> p2.x
  else
    y <=> p2.y
  end
end
to_s() click to toggle source
# File lib/lowess/point.rb, line 19
def to_s
  sprintf("(%0.4f, %0.4f)", @x, @y)
end