Project 83: Finding Component Form

Intro Problem: Suppose you left your house walking at direction 329.04 degrees, and you walk for 5.83 km.


You would be 5 km east and 3 km south of your house.

The magnitude of the vector shown above is 5.83.  The direction of the vector is 329.04 degrees.  

The component for of the vector is <5, -3>

Project 83: Variables 'mag' and 'dir' have been initialized.  

mag represents the magnitude of the given vector (5.83 in the example above)

dir represents the direction of the given vector in degrees (329.04 in the example above)

Task: Appropriately initialize the values for 'x' and 'y' which represent the x and y components of the vector in component form.


Note: The following trig methods are available.

cosine(x) 

sine(x) 

tangent(x) 

cosineInverse(x)

sineInverse(x)

tangentInverse(x)

**If your code works for 5 test cases, you can enter your e-mail address

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0