private static void VerifyAngular(this IQuantity quantity) { quantity.VerifyNotNull(); IEnumerable <IDimension[]> expected = new IDimension[][] { new[] { SiTheta.Radian }, new[] { UsTheta.Degree } }; if (expected.Any(x => quantity.Dimensions.AreEquivalent(x))) { return; } var message = string.Format("Unable to perfom function on quantity {{{0}}}.", quantity); throw new IncompatibleDimensionsException(message, quantity); }
private static void VerifyAngular(this IQuantity quantity) { quantity.VerifyNotNull(); IEnumerable<IDimension[]> expected = new IDimension[][] { new[] {SiTheta.Radian}, new[] {UsTheta.Degree} }; if (expected.Any(x => quantity.Dimensions.AreEquivalent(x))) return; var message = string.Format("Unable to perfom function on quantity {{{0}}}.", quantity); throw new IncompatibleDimensionsException(message, quantity); }