The "Most Hated" CSS Feature: asin(), acos(), atan() and atan2() | CSS-Tricks
Briefly

The "Most Hated" CSS Feature: asin(), acos(), atan() and atan2() | CSS-Tricks
"What if we wanted to go the other way around? If we have a ratio that represents the sine, cosine or tangent of an angle, how can we get the original angle? This is where inverse trigonometric functions come in! Each inverse function asks what the necessary angle is to get a given value for a specific trigonometric function; in other words, it undoes the original trigonometric function. So..."
"The functions are only defined from -1 to 1! Remember, cos() and sin() can take any angle, but they will always return a number between -1 and 1. For example, both cos(90°) and cos(270°) (not to mention others) return 0, so which value should acos(0) return? To answer this, both acos() and asin() have their domain (their input) and range (their output) restricted:"
Inverse trigonometric functions recover an angle from a given sine, cosine, or tangent ratio, effectively undoing the original trigonometric function. Trigonometric functions live on a unit circle, so arc length equals the angle expressed in radians. acos() and asin() accept only inputs between -1 and 1, which restricts their output ranges: acos() returns angles from 0° to 180°, while asin() returns angles from -90° to 90°. cos() and sin() can accept any angle but always produce values in [-1, 1], and inputs outside acos()/asin() domains produce NaN in CSS.
Read at CSS-Tricks
Unable to calculate read time
[
|
]