You could use an epsilon value to check if your float is inside a given range. For example:
float espilon = .05f;
if ( Math.abs(figure.y - .7f) < epsilon ) figure.y = .7f;
You could use an epsilon value to check if your float is inside a given range. For example:
float espilon = .05f;
if ( Math.abs(figure.y - .7f) < epsilon ) figure.y = .7f;