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

unit: remove explicitly prefixed constants #950

Merged
merged 2 commits into from
Apr 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 1 addition & 23 deletions unit/absorbedradioactivedose.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 1 addition & 23 deletions unit/angle.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion unit/area.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 1 addition & 23 deletions unit/capacitance.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 2 additions & 24 deletions unit/charge.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 1 addition & 23 deletions unit/conductance.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 1 addition & 23 deletions unit/current.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions unit/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// unit or a common combination of base units, named for the physical quantity
// it represents (Length, Mass, Pressure, etc.). Each type is defined from
// float64. The value of the float64 represents the quantity of that unit as
// expressed in SI base units (Kilogram, Metre, Pascal, etc.). For example,
// expressed in SI base units (kilogram, metre, Pascal, etc.). For example,
//
// height := 1.6 * unit.Metre
// acc := unit.Acceleration(9.8)
Expand All @@ -33,7 +33,7 @@
//
// func main(){
// t := 300 * unit.Kelvin
// p := 500 * unit.Kilopascal
// p := 500 * unit.Kilo * unit.Pascal
// v := unitVolume(p, t) // compile-time error
// }
//
Expand Down Expand Up @@ -75,7 +75,7 @@
// creates a variable "rate" which has a value of 1e-3 mol/s. Methods of
// unit can be used to modify this value, for example:
//
// rate.Mul(1 * unit.Centimetre).Div(1 * unit.Millivolt)
// rate.Mul(1 * unit.Centi * unit.Metre).Div(1 * unit.Milli * unit.Volt)
//
// To convert the unit back into a typed float64 value, the From methods
// of the dimensional types should be used. From will return an error if the
Expand All @@ -98,7 +98,7 @@
// because in this case slide is just a measurement of liquid volume. Instead,
// a constant could be defined.
//
// const Slide unit.Volume = 0.1 * unit.Microlitre
// const Slide unit.Volume = 0.1 * unit.Micro * unit.Litre
//
// Note that unit cannot catch all errors related to dimensionality.
// Different physical ideas are sometimes expressed with the same dimensions
Expand Down
24 changes: 1 addition & 23 deletions unit/energy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 1 addition & 23 deletions unit/equivalentradioactivedose.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 1 addition & 23 deletions unit/force.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 1 addition & 23 deletions unit/frequency.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.