// SetMaxFloat Allows easy setting of the Max value for an rpc.FloatRule.
// Usage:
//		AddNewFloatRule(ns, key, req, config.SetMaxFloat(max))
191119
func SetMaxFloat(max float64) floatRuleOpt {
	return func(i *rpc.FloatRule) {
		i.Maximum = max
		i.HasMax = true
	}
}
340947
func (s *ContinuousParameterRangeSpecification) SetMaxValue(v string) *ContinuousParameterRangeSpecification {
	s.MaxValue = &v
	return s
}
1340895
func formatFloat(f float64, maxPrec int) string {
	v := strconv.FormatFloat(f, 'f', -1, 64)

	idx := strings.LastIndex(v, ".")
	if idx == -1 {
		return v
	}

	sublen := idx + maxPrec + 1
	if sublen > len(v) {
		sublen = len(v)
	}

	return v[:sublen]
}
737062
func (s *MaxCountRule) SetMaxCount(v int64) *MaxCountRule {
	s.MaxCount = &v
	return s
}
719465
func NewFloatValue(value float64) *Float {
	returnValue := new(Float)
	returnValue.value = value
	return returnValue
}
546156
func (s *ScalingConfigurationInfo) SetMaxCapacity(v int64) *ScalingConfigurationInfo {
	s.MaxCapacity = &v
	return s
}
176309
func (ini *INI) SetFloat(key string, value float64) {
    ini.SectionSetFloat(DefaultSection, key, value)
}
905510
func (d *Datum) SetFloat64(f float64) {
	d.k = KindFloat64
	d.i = int64(math.Float64bits(f))
}
372264
func (s *AccountSettings) SetMaxSlots(v map[string]*int64) *AccountSettings {
	s.MaxSlots = v
	return s
}
592608
func (z *Big) SetFloat(x *big.Float) *Big {
	if x.IsInf() {
		if x.Signbit() {
			z.form = ninf
		} else {
			z.form = pinf
		}
		return z
	}

	neg := x.Signbit()
	if x.Sign() == 0 {
		if neg {
			z.form |= signbit
		}
		z.compact = 0
		z.precision = 1
		return z
	}

	z.exp = 0
	x0 := new(big.Float).Copy(x).SetPrec(big.MaxPrec)
	x0.Abs(x0)
	if !x.IsInt() {
		for !x0.IsInt() {
			x0.Mul(x0, c.TenFloat)
			z.exp--
		}
	}

	if mant, acc := x0.Uint64(); acc == big.Exact {
		z.compact = mant
		z.precision = arith.Length(mant)
	} else {
		z.compact = c.Inflated
		x0.Int(&z.unscaled)
		z.precision = arith.BigLength(&z.unscaled)
	}
	z.form = finite
	if neg {
		z.form |= signbit
	}
	return z
}
1273712
func (s *DescribeSnapshotsInput) SetMaxRecords(v int64) *DescribeSnapshotsInput {
	s.MaxRecords = &v
	return s
}
944376
func (s *SendQuota) SetMax24HourSend(v float64) *SendQuota {
	s.Max24HourSend = &v
	return s
}
258016
func (s *RegisterScalableTargetInput) SetMaxCapacity(v int64) *RegisterScalableTargetInput {
	s.MaxCapacity = &v
	return s
}
728315
func (s *ScalableTarget) SetMaxCapacity(v int64) *ScalableTarget {
	s.MaxCapacity = &v
	return s
}
855554
func (a *StartScreencastArgs) SetMaxHeight(maxHeight int) *StartScreencastArgs {
	a.MaxHeight = &maxHeight
	return a
}
793817
func (s *Artwork) SetMaxHeight(v string) *Artwork {
	s.MaxHeight = &v
	return s
}
343983
func (s *ContinuousParameterRange) SetMaxValue(v string) *ContinuousParameterRange {
	s.MaxValue = &v
	return s
}