I think I fixed a bug in the triangle wave