How do you “translate” this Python code into C++?
(yp < y1) != (yp < y2)
I have tried this:
(yp > y1) && (yp < y2)
But I think it is wrong because I don’t get the expected result.
I’m not sure, but I guess it could be:
((yp > y1) && (yp < y2) || (yp > y2) && (yp < y1))
By the way, I’ve said translate and I use a language like C++ to understand better its meaning.
I’m not using Python and I don’t have installed on my PC.
2