100-days-of-rust/Week-08/Day-53_Javelin-Parabolic-Throw/README.md
2023-03-23 21:14:34 -04:00

17 lines
528 B
Markdown

# Javelin Parabolic Throw
Write a function that takes initial speed (**v** in m/s) and throw angle (**a** in degrees) and returns the maximum height and maximum range reached by javelin as a string.
## Examples
```text
javelinThrow(36.7, 45) ➞ "Ymax=34m, Xmax=137m"
javelinThrow(51.3, 20) ➞ "Ymax=16m, Xmax=172m"
javelinThrow(100.1, 89) ➞ "Ymax=511m, Xmax=36m"
```
## Notes
- Javelin starts moving at h=0m.
- Gravitational acceleration is **g=9.81 m/s^2**.
- All results should be rounded to the nearest whole number.