Return

How do i mathematically write ?

1 Name: Anonymous 2020-07-29 18:52
how do I mathematically write that I am thresholding an output? So, for example, my C code is:
out = abs(x - y) >= 100 ? 0 : 255;

but how do I mathematically make it look pretty?
2 Name: Anonymous 2020-07-29 18:56
3 Name: Anonymous 2020-07-29 19:02
Nevermind, figured it out! Found by just randomly scrolling through latex images

\[
f_t=\begin{cases}
255, & \text{if $\lvert f_D - f_0 \rvert > t$}.\\
0, & \text{otherwise}.
\end{cases}
\]

Return
Name:
Leave this field blank: