Use custom math class, round object positions with two decimals

Dependency: https://github.com/armory3d/iron/pull/28
This commit is contained in:
Martin Wallin 2017-12-30 12:13:35 +01:00
parent c6de00dc60
commit 773aafbb26

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) {