You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
clarify how to handle integer and fractional ratios in unit conversions
Couple examples:
Fractional Ratio
decimal precision is set to 3
input unit is vertical_per_horizontal (phenomenon is slope)
0.0 → "0:1"
1.0 → "1:1"
2.0 → "1:0.5"
0.5 → "1:2"
0.333 → "1:3.003"
0.3333 → "1:3" (since 1/0.3333 = 3.0003 which gets rounded to 3.000)
0.2857 → "1:3.5"
Integer Ratio
Fractional Ratio
decimal precision is set to 3
input unit is vertical_per_horizontal (phenomenon is slope)
0.0 → "0:1"
1.0 → "1:1"
2.0 → "2:1"
0.5 → "1:2"
0.333 → "1000:3003"
0.3333 → "1:3"
0.2857 → "2:7"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
clarify how to handle integer and fractional ratios in unit conversions
Couple examples:
Fractional Ratio
decimal precision is set to 3
input unit is vertical_per_horizontal (phenomenon is slope)
0.0 → "0:1"
1.0 → "1:1"
2.0 → "1:0.5"
0.5 → "1:2"
0.333 → "1:3.003"
0.3333 → "1:3" (since 1/0.3333 = 3.0003 which gets rounded to 3.000)
0.2857 → "1:3.5"
Integer Ratio
Fractional Ratio
decimal precision is set to 3
input unit is vertical_per_horizontal (phenomenon is slope)
0.0 → "0:1"
1.0 → "1:1"
2.0 → "2:1"
0.5 → "1:2"
0.333 → "1000:3003"
0.3333 → "1:3"
0.2857 → "2:7"
https://github.com/iTwin/itwinjs-backlog/issues/1147#issuecomment-2217975255
based on this conclusion, for integer ratio, we should not always have a "1" on one side of the ratio?
Beta Was this translation helpful? Give feedback.
All reactions