Electronic Arts interview question

Using just basic vector math, rotate on vector around another.

Interview Answer

Anonymous

17 Sept 2017

Project the vector onto the one used as an axis via the dot product and then multiply that value by the normalized axis. Subtract the original vector from this projected vector and add it to the projected vector.

1