class POINT inherit ANY redefine out end creation make feature x,y : REAL -- the coordinates of the point left_of ( p, q: like Current ) : BOOLEAN is -- Is Current to left of directed line pq? local a, b, c, d : REAL do a := p.y - q.y b := q.x - p.x c := x - p.x d := y - p.y Result := (a*c + b*d > 0) -- std_error . put_string ( "Result of left_of with Current = " ) -- std_error . put_string ( Current.out ) -- std_error . put_new_line -- std_error . put_string ( "%Np = " ) -- std_error . put_string ( p.out ) -- std_error . put_string ( " q = " ) -- std_error . put_string ( q.out ) -- std_error . put_string ( "%N is " + Result.out + "%N" ) end prefix "-" : like Current is do !! Result.make ( -x, -y ) end out : STRING is do Result := x.out + " " + y.out end feature {NONE} make (a,b: REAL) is do x := a y := b end end -- class POINT