How to make a triangle wave

For anyone else looking for that (like me lately…) it’s:

arccosine ( cosine x )

If you divide it by Pi it will give you a triangle wave within the range of 0 and 1.