If I did not know that side AB was 489.84 or that side BC was 12.66, how could I calculate these two lengths with JavaScript given I had all the other information?
Use the Math.sin
and Math.cos
functions. Note: these functions accept radians, you would thus need to convert degrees by using rad = deg * Math.PI/180
:
Math.cos(88.52 * Math.PI/180) * 490; // 12.655720238100102
Math.sin(88.52 * Math.PI/180) * 490; // 489.83653676022874
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With