Articles Tagged
The “Most Hated” CSS Feature: tan()
Last time, we discussed that, sadly, according to the State of CSS 2025 survey, trigonometric functions are deemed the “Most Hated” CSS feature.…
tan()
tan() function takes a calculation that resolves to either an <angle> or <tnumber> and returns the result's tangent, which ranges between -Infinity and Infinity. calc()
calc() function performs math between values, whether that's addition, subtraction, division, or multiplication, along with any other math function. CSS Typed Arithmetic
The “Most Hated” CSS Feature: cos() and sin()
sin() and cos(). Creating a Clock with the New CSS sin() and cos() Trigonometry Functions
CSS trigonometry functions are here! Well, they are if you’re using the latest versions of Firefox and Safari, that is. Having this sort of mathematical power in CSS opens up a whole bunch of possibilities. In this tutorial, I thought …
Using Absolute Value, Sign, Rounding and Modulo in CSS Today
For quite a while now, the CSS spec has included a lot of really useful mathematical functions, such as trigonometric functions (sin(), cos(), tan(), asin(), acos(), atan(), atan2()), exponential functions (…
Lots of Ways to Use Math.random() in JavaScript
Math.random() is an API in JavaScript. It is a function that gives you a random number. The number returned will be between 0 (inclusive, as in, it’s possible for an actual 0 to be returned) and 1 (exclusive, as in, …