2 years ago

#51241

test-img

Charly

Java is returning the wrong value when only using int

So I have this formula :

abs = (MaxX-(MaxX*((xC2-abs)/(xC2-MaxX))))

The different values are respectively :

abs = 669

MaxX = 667

xC2 = 705

The program is always returning the value MaxX, and I can't seem to understand why. Note : I do a System.out.println(abs) just after the calculation.

java

calculation

0 Answers

Your Answer

Accepted video resources