github.com/gopherd/gonum@v0.0.4/unit/constant/defined_types.go (about) 1 // Code generated by "go generate github.com/gopherd/gonum/unit/constant”; DO NOT EDIT. 2 3 // Copyright ©2019 The Gonum Authors. All rights reserved. 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file. 6 7 //go:build ignore 8 // +build ignore 9 10 package main 11 12 import "github.com/gopherd/gonum/unit" 13 14 var definedTypes = []struct { 15 unit unit.Uniter 16 name string 17 }{ 18 {unit: unit.AbsorbedRadioactiveDose(1), name: "unit.AbsorbedRadioactiveDose"}, 19 {unit: unit.Acceleration(1), name: "unit.Acceleration"}, 20 {unit: unit.Angle(1), name: "unit.Angle"}, 21 {unit: unit.Area(1), name: "unit.Area"}, 22 {unit: unit.Capacitance(1), name: "unit.Capacitance"}, 23 {unit: unit.Charge(1), name: "unit.Charge"}, 24 {unit: unit.Conductance(1), name: "unit.Conductance"}, 25 {unit: unit.Current(1), name: "unit.Current"}, 26 {unit: unit.Dimless(1), name: "unit.Dimless"}, 27 {unit: unit.Energy(1), name: "unit.Energy"}, 28 {unit: unit.EquivalentRadioactiveDose(1), name: "unit.EquivalentRadioactiveDose"}, 29 {unit: unit.Force(1), name: "unit.Force"}, 30 {unit: unit.Frequency(1), name: "unit.Frequency"}, 31 {unit: unit.Inductance(1), name: "unit.Inductance"}, 32 {unit: unit.Length(1), name: "unit.Length"}, 33 {unit: unit.LuminousIntensity(1), name: "unit.LuminousIntensity"}, 34 {unit: unit.MagneticFlux(1), name: "unit.MagneticFlux"}, 35 {unit: unit.MagneticFluxDensity(1), name: "unit.MagneticFluxDensity"}, 36 {unit: unit.Mass(1), name: "unit.Mass"}, 37 {unit: unit.Mole(1), name: "unit.Mole"}, 38 {unit: unit.Power(1), name: "unit.Power"}, 39 {unit: unit.Pressure(1), name: "unit.Pressure"}, 40 {unit: unit.Radioactivity(1), name: "unit.Radioactivity"}, 41 {unit: unit.Resistance(1), name: "unit.Resistance"}, 42 {unit: unit.Temperature(1), name: "unit.Temperature"}, 43 {unit: unit.Time(1), name: "unit.Time"}, 44 {unit: unit.Torque(1), name: "unit.Torque"}, 45 {unit: unit.Velocity(1), name: "unit.Velocity"}, 46 {unit: unit.Voltage(1), name: "unit.Voltage"}, 47 {unit: unit.Volume(1), name: "unit.Volume"}, 48 } 49 50 func definedEquivalentOf(q unit.Uniter) string { 51 for _, u := range definedTypes { 52 if unit.DimensionsMatch(q, u.unit) { 53 return u.name 54 } 55 } 56 return "" 57 }