Skip to content

Change speed unit abbreviations in SpeedConversion#192

Closed
DerekErb wants to merge 1 commit into
TheAlgorithms:masterfrom
DerekErb:patch-1
Closed

Change speed unit abbreviations in SpeedConversion#192
DerekErb wants to merge 1 commit into
TheAlgorithms:masterfrom
DerekErb:patch-1

Conversation

@DerekErb

Copy link
Copy Markdown

Removed slashes from conversation strings
They are unnecessary and were inconsistent (mph but km/h for example)

Removed slashes from conversation strings
They are unnecessary and were inconsistent (mph but km/h for example)
@darwinz

darwinz commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution! We're going to pass on this one: km/h, m/s, and ft/s are the standard unit symbols (the slash is part of the notation — mph is just the customary exception), so removing the slashes would make the API nonstandard (ms in particular reads as milliseconds) and would break every existing caller. It also leaves the test suite failing, since ConversionsTest::testSpeedConversion calls convertSpeed() with the slashed units. If you'd like to contribute further, fixing the imprecise ft/s factor (1.097 vs the exact 1.09728) with an updated test would be a genuinely useful follow-up.

@darwinz darwinz closed this Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants