diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-02-16 11:52:23 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-02-16 11:52:23 -0500 |
| commit | 4ba873caba1d725aa72a135e4bd5fc69a9b7ef64 (patch) | |
| tree | 57f7c9646b78dfa13ddfc225a5ae5b1f750ff408 /mass.go | |
| parent | 6498718bd0ea27606dc0a4e67d4a966ffe1abfdf (diff) | |
| download | volute-4ba873caba1d725aa72a135e4bd5fc69a9b7ef64.zip | |
microui
Diffstat (limited to 'mass.go')
| -rw-r--r-- | mass.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/mass.go b/mass.go deleted file mode 100644 index 158bc37..0000000 --- a/mass.go +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "errors" - "fmt" -) - -type MassFlowRate float32 - -const ( - KilogramsPerSecond MassFlowRate = 1 - PoundsPerMinute MassFlowRate = 0.007_559_872_833 -) - -var MassFlowRateUnits = []string{"kg/s", "lb/min"} - -func ParseMassFlowRateUnit(s string) (MassFlowRate, error) { - // Each case corresponds to a value in MassFlowRateUnits. - switch s { - case "kg/s": - return KilogramsPerSecond, nil - case "lb/min": - return PoundsPerMinute, nil - default: - return *new(MassFlowRate), errors.New( - fmt.Sprintf("invalid mass flow rate unit: '%s'", s)) - } -} |