Cross-reference between delphi records
- by Paul-Jan
Let's say I have a record TQuaternion and a record TVector. Quaternions have some methods with TVector parameters. On the other hand, TVector supports some operations that have TQuaternion parameters.
Knowing that Delphi (Win32) does not allow for forward record declarations, how do I solve this elegantly?
Using classes is not really an option here, because I really want to use operator overloading for this rare case where it actually makes good sense.
For now I simply moved these particular methods out of the records and into separate functions, the good old-fashioned way. Better suggestions are most welcome.