I have a calculation that goes like this:
$$\text{<any positive number>} - 100$$
As long as the result is a positive number it is acceptable.
However, if the result is a negative number, I need the outcome to calculate to zero. A negative number is not permissible.
Is such a formula possible?
Update 1
This is for use in a CSS calc function .
.class { margin-top: calc(100vh - 100px); }
I don't want the margin to ever be negative.
The function accepts only basic math operators (+, -, /, *).
Update 2
Some have mentioned in the comments that this question is more about CSS than math, and belongs in Stack Overflow.
However, this question is seeking a mathematical formula which has nothing to do with CSS (or coding, for that matter). It just happens to go into a CSS function.
You can write the $\max$ as
$\max(x,y) = (|x-y|+x+y)/2$
thus you would like $\max( x-100,0)$ that can be written as $$ (|x-100|+x-100)/2 $$