Skip to content

Commit

Permalink
a few additional units
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Jordan committed Jun 21, 2023
1 parent 5b10a81 commit e00236a
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions lib/Units.pm
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,12 @@ our %known_units = (
hour => {
factor => 3600,
s => 1,
aliases => [ 'hours', 'hr', 'h' ]
aliases => [ 'hours', 'hrs', 'hr', 'h' ]
},
day => {
factor => 86400,
s => 1
factor => 86400,
s => 1,
aliases => ['days']
},
month => { # 60 * 60 * 24 * 30
factor => 2592000,
Expand Down Expand Up @@ -180,6 +181,11 @@ our %known_units = (
factor => 1E-15,
m => 1
},
meter => {
factor => 1,
m => 1,
aliases => ['meters']
},

# ENGLISH LENGTHS
inch => {
Expand Down Expand Up @@ -233,6 +239,11 @@ our %known_units = (
m => 3,
aliases => ['cups']
},
gallon => {
factor => 0.00378541,
m => 3,
aliases => [ 'gallons', 'gal' ]
},

# VELOCITY: fundamental unit m/s (meters per second)
knots => { # nautical miles per hour
Expand Down Expand Up @@ -335,10 +346,11 @@ our %known_units = (
aliases => [ 'pound', 'pounds', 'lbs' ]
},
ton => {
factor => 8900,
m => 1,
kg => 1,
s => -2
factor => 8900,
m => 1,
kg => 1,
s => -2,
aliases => [ 'tons' ]
},

# ENERGY: fundamental unit m^2 kg / s^2
Expand Down

0 comments on commit e00236a

Please sign in to comment.