turk@Apple.COM (Ken "Turk" Turkowski) (05/01/89)
It seemsed to me that the ?: operator would be perfect for expressing linear interpolation: a = b ? c : d; = c, when b = 1 = d, when b = 0 = linearly interpolates or extrapolates otherwisw. However, there are a couple of problems: 1) Cfront doesn't seem to like overloading the ?: operator 2) You can't add member functions to the "float" class. Restriction 2 can be overcome by defining your own class that includes nothing but a float. Can anyone find other suitable uses for ?: overloading? Are we doomed to never having member functions for "built-in" classes? -- Ken Turkowski @ Apple Computer, Inc., Cupertino, CA Internet: turk@apple.com Applelink: TURKOWSKI1 UUCP: sun!apple!turk