better.acos | R Documentation |
This function is a wrapper around the standard acos function, which returns the corresponding angle between 0 and pi for any output of the cosine function. This wrapper is able to return an angle between 0 and 2pi by looking at the sides of a right angled triangle. The angle this function returns is placed at the origin of a cartesian coordinate system and spans between the hypotenuse and the adjacent side. The sign of the opposite side enables this function to return angles between 0 and 2pi.
better.acos(hypotenuse, adjacent, oppisite)
hypotenuse |
Length of the a triangles hypotenuse |
adjacent |
Signed length of an angles adjacent side. The sign describes the direction the triangle is pointing in a cartesian coordinate system |
oppisite |
Signed length of an angles oppisite side. The sign describes the direction the triangle is pointing in a cartesian coordinate system |
Angle between the x-axis and the hypotenuse of an arbitrary triangle
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.