Merge remote-tracking branch 'origin/master'
All checks were successful
Validate Gradle Wrapper / Validation (push) Successful in 37s
Tests / runPush (push) Successful in 24m11s

This commit is contained in:
Anuken 2024-11-30 10:13:01 -05:00
commit c189d15983
2 changed files with 5 additions and 5 deletions

View File

@ -966,8 +966,8 @@ public class LExecutor{
exec.textBuffer.append(strValue); exec.textBuffer.append(strValue);
}else{ }else{
//display integer version when possible //display integer version when possible
if(Math.abs(value.numval - (long)value.numval) < 0.00001){ if(Math.abs(value.numval - Math.round(value.numval)) < 0.00001){
exec.textBuffer.append((long)value.numval); exec.textBuffer.append(Math.round(value.numval));
}else{ }else{
exec.textBuffer.append(value.numval); exec.textBuffer.append(value.numval);
} }
@ -1027,8 +1027,8 @@ public class LExecutor{
exec.textBuffer.replace(placeholderIndex, placeholderIndex + 3, strValue); exec.textBuffer.replace(placeholderIndex, placeholderIndex + 3, strValue);
}else{ }else{
//display integer version when possible //display integer version when possible
if(Math.abs(value.numval - (long)value.numval) < 0.00001){ if(Math.abs(value.numval - Math.round(value.numval)) < 0.00001){
exec.textBuffer.replace(placeholderIndex, placeholderIndex + 3, (long)value.numval + ""); exec.textBuffer.replace(placeholderIndex, placeholderIndex + 3, Math.round(value.numval) + "");
}else{ }else{
exec.textBuffer.replace(placeholderIndex, placeholderIndex + 3, value.numval + ""); exec.textBuffer.replace(placeholderIndex, placeholderIndex + 3, value.numval + "");
} }

View File

@ -188,7 +188,7 @@ public class LogicDialog extends BaseDialog{
Label label = out.add("").style(Styles.outlineLabel).padLeft(4).padRight(4).width(140f).wrap().get(); Label label = out.add("").style(Styles.outlineLabel).padLeft(4).padRight(4).width(140f).wrap().get();
label.update(() -> { label.update(() -> {
if(counter[0] < 0 || (counter[0] += Time.delta) >= period){ if(counter[0] < 0 || (counter[0] += Time.delta) >= period){
String text = s.isobj ? PrintI.toString(s.objval) : Math.abs(s.numval - (long)s.numval) < 0.00001 ? (long)s.numval + "" : s.numval + ""; String text = s.isobj ? PrintI.toString(s.objval) : Math.abs(s.numval - Math.round(s.numval)) < 0.00001 ? Math.round(s.numval) + "" : s.numval + "";
if(!label.textEquals(text)){ if(!label.textEquals(text)){
label.setText(text); label.setText(text);
if(counter[0] >= 0f){ if(counter[0] >= 0f){