Documentation ¶
Index ¶
- Variables
- func Compare(op, v1, v2, vType string) bool
- func CompareFloats(v1, v2 float64, prec int) int
- func ComparePrecFloat(v1, v2 float64, prec int) float64
- func CompareTruncFloat(v1, v2 float64, prec int) float64
- func GetBool(str string) bool
- func GetDiffAbs(fromValue, toValue float64) float64
- func GetDiffPercent(fromValue, toValue float64) float64
- func GetDiffPercentAbs(fromValue, toValue float64) float64
- func GetFloat(str string) float64
- func GetFloatInterface(i interface{}) (f float64)
- func GetInt(str string) int
- func GetInt64(str string) int64
- func GetPrecFloat(value float64, prec int) float64
- func GetStrArrF(vs []float64) string
- func GetStrB(v bool) string
- func GetStrF(v float64) string
- func GetStrI(v int) string
- func GetStrI64(v int64) string
- func GetStrPrecF(v float64, prec int) string
- func GetTruncFloat(value float64, prec int) float64
- func GetValues(str, vType string) []string
- func GetWithPercent(value, percent float64, adding bool) float64
- type ExtValues
- type F
- type I
- type ValueType
Constants ¶
This section is empty.
Variables ¶
View Source
var ValueTypes = map[string]ValueType{
"bool": {"Boolean", `type="checkbox" value="0"`},
"float": {"Float", `type="number" step="0.01" min="0.00" value="0.00"`},
"int": {"Integer", `type="number" min="0" value="0"`},
"string": {"String", `type="text" value=""`},
}
Functions ¶
func CompareFloats ¶ added in v0.4.0
func ComparePrecFloat ¶
ComparePrecFloat, "v1>v2: >0", "v1<v2: <0", "v1=v2: 0"
func CompareTruncFloat ¶
CompareTruncFloat, "v1>v2: >0", "v1<v2: <0", "v1=v2: 0"
func GetDiffAbs ¶
func GetDiffPercent ¶
func GetDiffPercentAbs ¶
func GetFloatInterface ¶
func GetFloatInterface(i interface{}) (f float64)
func GetPrecFloat ¶
func GetStrArrF ¶
func GetStrPrecF ¶
func GetTruncFloat ¶
func GetWithPercent ¶
Adding or Subtracting percent to value
Types ¶
type ExtValues ¶
func GetRangeLimits ¶
Click to show internal directories.
Click to hide internal directories.