Question: We are trying out the system CodeRunner in this example - and this is an example of a CodeRunner question. You are going to implement
We are trying out the system "CodeRunner" in this example - and this is an example of a CodeRunner question. You are going to implement a function which projects a vector v into a vector u. You have seen several possible solutions to this problem so far. translate it to code.
here are the codes.
1 struct vec2 { 2 float x; 3 float y; 4 }; 5 6 vec2 refl(vec2 u, vec2 v) { 7 8 // Your code should be implemented here. 9 10 }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
