DigiPen-Faculty / CProcessing

MIT License
26 stars 3 forks source link

Requesting a CP_Vector function that returns anti-clockwise/clockwise angle between two vectors #21

Open gwong-dp opened 1 year ago

gwong-dp commented 1 year ago

Student requested a CP_Vector function that returns anti-clockwise/clockwise angle between two vectors. We might want to be careful about the coordinate system of CProcessing because since y-axis is downwards, usual clockwise/anti-clockwise formulas might end up being flipped.

Might also want to consider a CP_Vector_Sign that will return -1 when a vector is on the left side of another vector, 1 when it is on the right side.

gwong-dp commented 1 year ago

Implemented in Singapore branch here: 6667d889cac5490c49b61379d02bb4b911a4a414

Will update the wiki once we merge.