From 63d378be70bafe6820ee852f342aa77167f1a0b6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 13 Feb 2016 19:57:33 +1100 Subject: Use power instead of multiply --- object_print3d_utils/operators.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'object_print3d_utils') diff --git a/object_print3d_utils/operators.py b/object_print3d_utils/operators.py index 484827a6..bb2847d6 100644 --- a/object_print3d_utils/operators.py +++ b/object_print3d_utils/operators.py @@ -72,10 +72,10 @@ class Print3DInfoVolume(Operator): info.append(("Volume: %s³" % clean_float("%.8f" % volume), None)) if unit.system == 'IMPERIAL': - info.append(("%s \"³" % clean_float("%.4f" % ((volume * (scale * scale * scale)) / (0.0254 * 0.0254 * 0.0254))), + info.append(("%s \"³" % clean_float("%.4f" % ((volume * (scale ** 3.0)) / (0.0254 ** 3.0))), None)) else: - info.append(("%s cm³" % clean_float("%.4f" % ((volume * (scale * scale * scale)) / (0.01 * 0.01 * 0.01))), + info.append(("%s cm³" % clean_float("%.4f" % ((volume * (scale ** 3.0)) / (0.01 ** 3.0))), None)) report.update(*info) @@ -101,10 +101,10 @@ class Print3DInfoArea(Operator): info.append(("Area: %s²" % clean_float("%.8f" % area), None)) if unit.system == 'IMPERIAL': - info.append(("%s \"²" % clean_float("%.4f" % ((area * (scale * scale)) / (0.0254 * 0.0254))), + info.append(("%s \"²" % clean_float("%.4f" % ((area * (scale ** 2.0)) / (0.0254 ** 2.0))), None)) else: - info.append(("%s cm²" % clean_float("%.4f" % ((area * (scale * scale)) / (0.01 * 0.01))), + info.append(("%s cm²" % clean_float("%.4f" % ((area * (scale ** 2.0)) / (0.01 ** 2.0))), None)) report.update(*info) return {'FINISHED'} -- cgit v1.2.3