Skip to content

Commit 0a4279e

Browse files
Merge pull request #186 from lambda-feedback/tr161-wrong-conversion-factor-for-radians
Changed conversion factor for raidans
2 parents b5f6d7f + 26887e8 commit 0a4279e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

app/quantity_comparison_evaluation_tests.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,5 +240,16 @@ def test_MECH60001_dynamic_signals_error_with_dB(self):
240240
result = evaluation_function(res, ans, params, include_test_data=True)
241241
assert result["is_correct"] is True
242242

243+
def test_radians_to_frequency(self):
244+
ans = "2*pi*f radian/second"
245+
res = "f Hz"
246+
params = {
247+
"strict_syntax": False,
248+
"physical_quantity": True,
249+
"elementary functions": True
250+
}
251+
result = evaluation_function(res, ans, params, include_test_data=True)
252+
assert result["is_correct"] is True
253+
243254
if __name__ == "__main__":
244255
pytest.main(['-xk not slow', "--tb=line", os.path.abspath(__file__)])

app/unit_system_conversions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
This is the subset of common symbols whose short form symbols are allowed
8080
"""
8181
set_of_very_common_units_in_SI = {
82-
('radian', 'r', '(1)', tuple(), ('radians',)), # Note: here 'r' is used instead of the more common 'rad' to avoid collision
82+
('radian', 'r', '(1/(2*pi))', tuple(), ('radians',)), # Note: here 'r' is used instead of the more common 'rad' to avoid collision
8383
('steradian', 'sr', '(1)', tuple(), ('steradians',)),
8484
('minute', 'min', '(60*second)', tuple(), ('minutes',)),
8585
('hour', 'h', '(3600*second)', tuple(), ('hours',)),

0 commit comments

Comments
 (0)