#Why is it saying -0.85 is not greater than Float.MIN_VALE?
21 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @blissful urchin! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 720 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Have you executed the code and seen, what actually happens?
yeah the inside of the if statement never runs (i can tell visually because all objects have no scale)
if i remove the if statement but keep the scale setting stuff thats inside it than they do have scale
so -0.85 is genuinely being counted as greater than Float.MIN_VALUE
i dont need the if statement at all im just wondering why it does that
Hmmm, is scaleoffset a double or a float?
float:
public Entity(EntityType type, Matrix4f matrix, float scaleOffset) {
if (scaleOffset > Float.MIN_VALUE) {
this.matrix.scale(this.type.size + scaleOffset);
}
-0.07886315 is less than or equal to 1.4E-45
-0.4054676 is less than or equal to 1.4E-45
-0.61426634 is less than or equal to 1.4E-45
-0.5344303 is less than or equal to 1.4E-45
-0.5856453 is less than or equal to 1.4E-45
-0.51595694 is less than or equal to 1.4E-45
-0.581792 is less than or equal to 1.4E-45
-0.50864005 is less than or equal to 1.4E-45
public Entity(EntityType type, Matrix4f matrix, float scaleOffset) {
this.type = type;
this.matrix = matrix;
if (scaleOffset > Float.MIN_VALUE) {
this.matrix.scale(this.type.size + scaleOffset);
} else {
System.out.println(scaleOffset+" is less than or equal to "+Float.MIN_VALUE);
}
}
Interesting
ig to get the real min value id just need to do -Float.MAX_VALUE
