Quick Dot Product Question
I''m currently writing a 2D Vector Class and am wondering if there''s an operator that''s commonly overloaded for the Dot Product. I''ve seen % used somewhere.
January 18, 2001 01:30 PM
quote:
Original post by Moot
I''m currently writing a 2D Vector Class and am wondering if there''s an operator that''s commonly overloaded for the Dot Product. I''ve seen % used somewhere.
I would reccommend NOT using overloaded operators for ANY vector operations. It only serves to obfuscate what is really going on, and makes maintenance much harder later on. While it may be easier to type "%" than "Dot()", you end up with crap like:
myVec = foo + bar - boo % far;
Which is shitty to read later on. You can run into precedence problems also.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement