Repository navigation
fix(CoordinateUtils): label zero latitude/longitude as N/E in coordinateString - #549
Conversation
…ateString Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Direction formatting and test lib/utils/coordinate_utils.ts, lib/utils/coordinate_utils.test.ts |
The direction checks now use >= 0 for latitude and longitude. A test verifies the formatted output for zero coordinates. |
Priority:
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers: makrsmark
Merge Risk: 
Minimal · up to 6f205
-
No actionable merge-blocking risk remains.
Pre-merge checks: 
5
-
Full details: Linked Issues check
-
Explanation
Issue
#452requires zero latitude to use N and zero longitude to use E incoordinateString, consistent withgetDirection. The PR changes both checks from> 0to>= 0. The new test verifies{ latitude: 0, longitude: 0 }formats as0.000 N, 0.000 E. The non-finite input note is optional and is not a required objective.
Full details: Out of Scope Changes check
-
Explanation
The PR changes only the two hemisphere checks in
lib/utils/coordinate_utils.tsand adds the requested regression test inlib/utils/coordinate_utils.test.ts. These changes directly implement issue#452. No unrelated change is shown.
Full details: Docstring Coverage
-
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the zero line,
North and east now both align.
Three neat decimals softly show,
For coordinates set to zero.
Hop, the labels now are right!
Comment @coderabbitai help to get the list of available commands.
makrsmark
left a comment
There was a problem hiding this comment.
This probably doesn't actually matter, but sure
Fixes #452
coordinateStringused a strict> 0check for the hemisphere, so a latitude of exactly 0 came out asSand a longitude of exactly 0 asW. It now uses>= 0, which matchesgetDirectiontreating N/E as the positive side, and there is a test for the 0/0 case incoordinate_utils.test.ts.Summary by CodeRabbit