Skip to content

Clean up some minor stuff #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

IDisposable
Copy link

typo
latitudePrecission -> latitudePrecision

return value doesn't need to be VARCHAR(MAX), since max digits is 15 and doesn't include the +, we should be using 16
VARCHAR(MAX) -> VARCHAR(16)

clarity for order of operations
POWER(@EncodingBase, @codeLength / -2 + 2) - > POWER(@EncodingBase, (@codeLength / -2) + 2)

Not changed:
Should we range-check @codeLength for a maximum value? It could mess up the precision calculations in the latitude = 90 logic around line 46.

typo
  `latitudePrecission` -> `latitudePrecision`

return value doesn't need to be `VARCHAR(MAX)`, since max digits is 15 and doesn't include the `+`, we should be using `16`
  `VARCHAR(MAX)` -> `VARCHAR(16)`

clarity for order of operations
  `POWER(@EncodingBase, @codelength / -2 + 2)` - > `POWER(@EncodingBase, (@codelength / -2) + 2)`

Not changed:
  Should we range-check `@codeLength` for a _maximum_ value? It could mess up the precision calculations in the latitude = 90 logic around line 46.
@@ -44,9 +44,9 @@ BEGIN
IF (@latitude = @LatitudeMax)
BEGIN
DECLARE @latitudePrecission DECIMAL(9,6);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvements! And for pointing out the typo. Please change it also here on line 46 so I can merge your pull request. Thanks!

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