Skip to main content
gamedev.net
🔒 Locked

Quick 2D question

Started by Thunder_Hawk Aug 5, 2002 at 10:58 PM 1 replies 700+ views
Original Post
Thunder_Hawk
Thunder_Hawk
OK, //cross product const Vector2D cross() { return Vector2D(-y, x); } Will that member function preserve the functionality of the 3D version? I guess this function would be used for finding the "normal" of a 2D line given only the direction vector between two points. _____________________________ And the Phoenix shall rise from the ashes... --Thunder_Hawk -- ¦þ ______________________________
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Forma
Thunder_Hawk
Thunder_Hawk
*bump*
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Forma
eloso
eloso
Well, i don''t think it is mathematically correct to call this a cross product. I have the same function in my math lib and simply named it getNormal(). And yes, you can use your function to find the "normal" of a 2d-line.

eloso

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.