Last active
February 28, 2021 17:54
-
-
Save julienetie/38ab83d0429cd634d02d3feafc68b9e3 to your computer and use it in GitHub Desktop.
Trigonometry Helpers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {PI, asin, acos, atan} = Math; | |
/** | |
Arcsine is an inverse of the sine function. | |
In other words, it helps to find the angle of a triangle which has a | |
know value of sine. As sine's codomain for real numbers is [−1, 1], | |
we can only calculate arcsine for numbers in that interval. | |
*/ | |
// Inverse sin, cos and tan fns in degrees. | |
const asinDeg = r => 180 * asin(r) / PI; | |
const acosDeg = r => 180 * acos(r) / PI; | |
const atanDeg = r => 180 * atan(r) / PI; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment