Skip to content

Commit

Permalink
fix pythagorean helper for baseunits not in API unit (angle unit)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristjan Nielsen committed Oct 20, 2023
1 parent b03d42b commit 734872d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions GsaGH/Parameters/5_Results/Quantities/ResultUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
namespace GsaGH.Parameters.Results {
internal static class ResultUtility {
internal static T PythagoreanQuadruple<T>(T x, T y, T z, Enum unit) where T : IQuantity {
double a = x.As(x.QuantityInfo.BaseUnitInfo.Value);
double b = y.As(y.QuantityInfo.BaseUnitInfo.Value);
double c = z.As(z.QuantityInfo.BaseUnitInfo.Value);
double a = x.As(unit);
double b = y.As(unit);
double c = z.As(unit);
double pyth = Math.Sqrt((a * a) + (b * b) + (c * c));
return (T)Quantity.From(pyth, unit);
}
Expand Down

0 comments on commit 734872d

Please sign in to comment.