package bounds
import "git.sr.ht/~seirdy/moac/v2/internal/bounds"
Package bounds holds/checks max/min acceptable values of user-provided inputs
Index ¶
- Constants
- Variables
- func NonNegative(vs ...float64) error
- func ValidateTemperature(temp float64) error
Constants ¶
const ( // PlanckTemp is the Planck Temperature, the maximum temperature that today's physics can handle // Temperature values above this will result in an error. PlanckTemp = 1.417e32 )
Variables ¶
var ( // ErrImpossiblyHigh indicates that a value is higher than our current // understanding of physics allows or accounts for. ErrImpossiblyHigh = errors.New("value is physically impossibly large") // ErrImpossibleNegative indicates that a value that must be above zero was too low. ErrImpossibleNegative = errors.New("is below 0") )
Functions ¶
func NonNegative ¶
NonNegative validates that all the given values are at or above 0.
func ValidateTemperature ¶
ValidateTemperature ensures that a given temperature is physically possible. Temperatures must be above zero and cannot surpass the Planck Temperature.
Source Files ¶
- Version
- v2.0.2 (latest)
- Published
- Oct 5, 2021
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 2 weeks ago –
Tools for package owners.