Skip to content

Commit

Permalink
Add alias deg for ° in ConstructiveSolidGeometry
Browse files Browse the repository at this point in the history
  • Loading branch information
fhagemann committed Dec 20, 2024
1 parent 17e46fd commit 3f49516
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/ConstructiveSolidGeometry/ConstructiveSolidGeometry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,15 @@ module ConstructiveSolidGeometry
# Plotting
include("plotting/plotting.jl")

# define the alias "deg" for ° --> this will also allow to use deg in config files
# u"deg" will be defined when explicitly calling
# using SolidStateDetectors.ConstructiveSolidGeometry
const deg = Unitful.°

Unitful.register(ConstructiveSolidGeometry)
const localunits = Unitful.basefactors
function __init__()
merge!(Unitful.basefactors, localunits)
Unitful.register(ConstructiveSolidGeometry)
end
end

0 comments on commit 3f49516

Please sign in to comment.