Skip to content
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

Allow printing of superscript decimal #81

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

Conversation

jiahao
Copy link
Contributor

@jiahao jiahao commented Apr 27, 2016

Unicode has no superscript decimal character. Instead, it is faked using
U+FF65, HALFWIDTH KATAKANA MIDDLE DOT.

Also, improves error handling in superscript()

  • Fix typo in error message
  • throws DomainError rather than a generic error()
  • Error message now contains the invalid character in question

Example of usage:

julia> SIUnits.SIQuantity{Float64,zeros(8)...,0.4}(1.0)
1.0 sr⁰・⁴

Unicode has no superscript decimal character. Instead, it is faked using
U+FF65, HALFWIDTH KATAKANA MIDDLE DOT.

Also, improves error handling in `superscript()`
- Fix typo in error message
- `throw`s `DomainError` rather than a generic `error()`
- Error message now contains the invalid character in question

Example of usage:

    julia> SIUnits.SIQuantity{Float64,zeros(8)...,0.4}(1.0)
    1.0 sr⁰・⁴
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.

1 participant