Consider a graph of an equation like y = sin(x).
Now suppose that I want to have a single equation where y gets the same value that it would get in the following computer code:
if (y - sin(x) <= 45) {
y = sin(x);
}
else {
y = 0;
}
How would I mathematically build the above logic into a single math equation with no externally defined functions, for graphing (or really any other purpose)?
Note: this is a question about standard math notation, not a particular calculator.