If you have D2006, you can implement vectors like this:
I'm not sure, but it should works with records, too.Code:type TVector3f = class(TObject) X, Y, Z: Single; class operator Implicit(Value: Single) : TVector3f; // := class operator Add(V1: TVector3f; V2: TVector3f): TVector3f; // + { ... and so on ... } end;
Bookmarks