I've created a class that is supposed to represent a two-dimensional point. It is defined here:
defclass( gf_2dPoint
() ;superclass
(
(x
@initarg x
@reader getX
@writer setX
)
(y
@initarg y
@reader getY
@writer setY
)
)
) ; defclass
Then in my main procedure I instantiate two points like so:
gf_Pt1 = makeInstance('gf_2dPoint ?x 0 ?y 3)
gf_Pt2 = makeInstance('gf_2dPoint ?x 2 ?y 5)
I wanted to create another class, maybe called gf_line, whereby a gf_line instance could be created with the makeInstance and passing to gf_2dPoint objects.
Thanks for any insights.
By the way, I may just use a simpler procedure solution, but was a bit curious.
-Gary