#!/usr/bin/perl
require 'operl.pl';

&defclass ('point','root');
&defmethod('point','init',
    '$xx = defined($_[0]) ? $_[0] : 0; $yy = defined($_[1]) ? $_[1] : 0;');
&defmethod('point','move',
    '$xx = defined($_[0]) ? $_[0] : $xx; $yy = defined($_[1]) ? $_[1] : $yy;');
&defmethod('point','movex', '$xx = defined($_[0]) ? $_[0] : $xx;');
&defmethod('point','movey', '$yy = defined($_[0]) ? $_[0] : $yy;');
&defmethod('point','rmove',
    '$xx += defined($_[0]) ? $_[0] : 0; $yy += defined($_[1]) ? $_[1] : 0;');
&defmethod('point','rmovex', '$xx += defined($_[0]) ? $_[0] : 0;');
&defmethod('point','rmovey', '$yy += defined($_[0]) ? $_[0] : 0;');
&defmethod('point','x', '$xx;');
&defmethod('point','y', '$yy;');

1;
