Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Flip float Coordinate

$
0
0

@az_rr wrote:

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.

eg.
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

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929