From 0296c04e320eee041c2d181ef6cbb74d09d7fed4 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 2 Mar 2002 19:40:26 +0000 Subject: [PATCH] For property-scale, apply the squared option before factor, etc. --- src/Main/fg_commands.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index 2f52e91de..36554cb23 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -543,9 +543,9 @@ do_property_scale (const SGPropertyNode * arg, SGCommandState ** state) bool squared = ((PropertyCommandState *)(*state))->getSquared()->getBoolValue(); - double result = (setting + offset) * factor; if (squared) - result = (result < 0 ? -1 : 1) * result * result; + setting = (setting < 0 ? -1 : 1) * setting * setting; + double result = (setting + offset) * factor; return prop->setDoubleValue(result); } -- 2.39.5