Пример #1
0
// Float representation of the value (will be 0.0, if not given or not parsable)
func (this *parameter) Float() float64 {
	if this.Values == nil {
		return 0
	} else {
		return reflekt.AsFloat(this.Values[0])
	}
}
Пример #2
0
// Floats returns values as float64 array (values will be 0.0, if not parsable to float64)
func (this *parameter) Floats() []float64 {
	if this.Values == nil {
		return nil
	} else {
		res := make([]float64, this.Count())
		for i, v := range this.Values {
			res[i] = reflekt.AsFloat(v)
		}
		return res
	}
}