Merge pull request #447 from guzzard/debug-console-decimals

Debug console use custom math class, round object positions with two decimals
This commit is contained in:
Lubos Lenco 2017-12-30 13:38:01 +01:00 committed by GitHub
commit d59157d4fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,6 @@
package armory.trait.internal;
import iron.math.Math;
import iron.Trait;
#if arm_debug
import kha.Scheduler;
@ -78,7 +79,7 @@ class DebugConsole extends Trait {
ui.text(o.name);
ui._x -= 18;
}
ui.text('(' + Std.int(o.transform.worldx() * 10) / 10 + ', ' + Std.int(o.transform.worldy() * 10) / 10 + ', ' + Std.int(o.transform.worldz() * 10) / 10 + ')', Align.Right);
ui.text('(' + Math.roundfp(o.transform.worldx()) + ', ' + Math.roundfp(o.transform.worldy()) + ', ' + Math.roundfp(o.transform.worldz()) + ')', Align.Right);
i++;
if (b) {
for (c in o.children) {