Conversion from radian to degree does not work
-
SBQuantity::radian radianValue(1.5); SBQuantity::degree degreeValue = radianValue; double val = degreeValue.getValue();
I've got val equal to 1.5 !!!
Perhaps it is a bug ? -
Actually, SBQuantity::radian, SBQuantity::degree, and SBQuantity::steradian are internally the same - they are SBQuantity::dimensionless. Therefore, there is no possibility to do a conversion like that, you need to convert radians into degrees yourself.
-
Note that there are two ratios provided with the SDK:
SBConstant::DegToRag
andSBConstant::RadToDeg
. -
Thanks.
It helps.SBQuantity::radian radianValue(1.5); SBQuantity::degree degreeValue = radianValue * SBConstant::RadToDeg;