Question: Your team has moved on from the spacecraft bridge user interface to programming the manual controls of the robots. There are 4 keys able to

Your team has moved on from the spacecraft bridge user interface to programming the manual controls of the robots. There are 4 keys able to control a robot on a 2D surface, ,,,. One of your team members has programmed a function to retrieve the input of a key as a 2D vector.
Your code will be run every time a key is pressed and it should determine the direction that the robot should move in. The final function in your code should be the one above. Your teammate notes that the direction should never exceed a length of 1.
The answer needs to be a flow with the mathematical functions for each step

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!