Flip float Coordinate

Hello all.

This seems like a simple task but I cant figure it out. I currently have a 2D coordinate and the two values are between 0 and 1.

ofPoint myPoint = ofPoint(0.1, 0.6).

How would I go about flipping one of the coordinates?

Psudo code

myPoint.x = myPoint.flipX
result should equal 0.9


what about

float flippedX = 1.f - X;

wow. its late and my brain is broken.

thank you

i know that feeling :wink: