Skip to content

Commit

Permalink
Support ^ for SIPrefix
Browse files Browse the repository at this point in the history
  • Loading branch information
wsshin authored Oct 2, 2023
1 parent eed892f commit 041963c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/prefix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Base.:*(x, y::SIPrefix) = x * y.factor
Base.:/(x::SIPrefix, y) = x.factor / y
Base.:/(x, y::SIPrefix) = x / y.factor

Base.:^(x::SIPrefix, y) = x.factor ^ y
Base.:^(x, y::SIPrefix) = x ^ y.factor

# Prefixes > 1
const quetta = SIPrefix("quetta", "Q", 1e30)
const ronna = SIPrefix("ronna", "R", 1e27)
Expand Down

0 comments on commit 041963c

Please sign in to comment.