class Cairo::Point
Public Class Methods
Source
static VALUE cr_point_initialize (VALUE self, VALUE x, VALUE y) { rb_ivar_set (self, id_at_x, x); rb_ivar_set (self, id_at_y, y); return Qnil; }
Public Instance Methods
Source
# File lib/cairo/point.rb, line 3 def distance(other) Math.hypot(other.x - x, other.y - y) end
Source
static VALUE cr_point_to_a (VALUE self) { return rb_ary_new3 (2, rb_ivar_get (self, id_at_x), rb_ivar_get (self, id_at_y)); }
Also aliased as: to_ary