Skip to content

Add latitude and longitude validation to lamberts_ellipsoidal_distance#14373

Merged
MaximSmolskiy merged 3 commits intoTheAlgorithms:masterfrom
galleazzijuniorsoftwareenginer:add_lambert_distance
Mar 13, 2026
Merged

Add latitude and longitude validation to lamberts_ellipsoidal_distance#14373
MaximSmolskiy merged 3 commits intoTheAlgorithms:masterfrom
galleazzijuniorsoftwareenginer:add_lambert_distance

Conversation

@galleazzijuniorsoftwareenginer
Copy link
Contributor

@galleazzijuniorsoftwareenginer galleazzijuniorsoftwareenginer commented Mar 13, 2026

Description

This pull request adds validation for latitude and longitude values in the lamberts_ellipsoidal_distance function.

✅ Allow edits by maintainers

Changes

  • Added validation for latitude values (-90 to 90)
  • Added validation for longitude values (-180 to 180)
  • Added doctest examples to ensure correct error handling

Motivation

These validations prevent invalid geographic coordinates from being used in the distance calculation, improving robustness and reliability of the function.

Type of change

  • Improvement
  • Bug fix
  • New feature
  • Documentation update

Testing

Tested locally using the provided doctests.

@galleazzijuniorsoftwareenginer
Copy link
Contributor Author

Ready for review.

@algorithms-keeper algorithms-keeper bot added awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files labels Mar 13, 2026
@algorithms-keeper algorithms-keeper bot removed the awaiting reviews This PR is ready to be reviewed label Mar 13, 2026
@MaximSmolskiy MaximSmolskiy merged commit 68473af into TheAlgorithms:master Mar 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This PR modified some existing files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants