diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-02-13 11:57:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-02-13 11:57:33 +0300 |
commit | 63d378be70bafe6820ee852f342aa77167f1a0b6 (patch) | |
tree | 1aa0aa35bd14455cfa1c5c694a07f12277ee9944 /object_print3d_utils | |
parent | cf871d6a3027bad3b39b66abf71a5d08f7650db5 (diff) |
Use power instead of multiply
Diffstat (limited to 'object_print3d_utils')
-rw-r--r-- | object_print3d_utils/operators.py | 8 |
1 files changed, 4 insertions, 4 deletions
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'} |