Skip to content

css: Implement math functions

Matthias Clasen requested to merge ccs-math into main

Implement the functions described in the "Mathematical Expressions" section of the "CSS Values and Units Module Level 4" spec, https://www.w3.org/TR/css-values-4/.

Beyond calc(), which we already had, this includes min(), max(), clamp(), round(), rem(), mod(), sin(), cos(), tan(), asin(), acos(), atan(), atan2(), pow(), sqrt(), hypot(), log(), exp(), abs(), sign(), e, pi, infinity and NaN.

Some tests included.

Merge request reports