// Float32 returns, as a float32, a pseudo-random number in [0.0,1.0) from
// the source in the context or the shared global source.
427257
func (l *Locking) Float32() (v float32) {
	l.Lock()
	v = l.R.Float32()
	l.Unlock()
	return
}
256121
func (enc *Encoder) EncodeFloat32(n float32) error {
	if enc.isPooled == 1 {
		panic(InvalidUsagePooledEncoderError("Invalid usage of pooled encoder"))
	}
	_, _ = enc.encodeFloat32(n)
	_, err := enc.Write()
	if err != nil {
		return err
	}
	return nil
}
1017470
func (d *Datum) GetFloat32() float32 {
	return float32(math.Float64frombits(uint64(d.i)))
}
506260
func (lr *LockedRand) Float32() (n float32) {
	lr.lk.Lock()
	n = lr.r.Float32()
	lr.lk.Unlock()
	return
}
278820
func (d *Datum) SetFloat32(f float32) {
	d.k = KindFloat32
	d.i = int64(math.Float64bits(float64(f)))
}
188362
func (e *GameEvent) GetFloat32(name string) (float32, error) {
	// Get the key from the message
	k, err := e.getEventKey(name)
	if err != nil {
		return 0.0, err
	}

	// Make sure it's a bool.
	if k.GetType() != gameEventTypeFloat {
		return 0.0, _errorf("field %s: expected float, got %s", name, gameEventTypeNames[k.GetType()])
	}

	return k.GetValFloat(), nil
}
659311
func Float(v interface{}, err error) (float64, error) {
	if err != nil {
		return 0.0, err
	}

	vf, ok := v.(float64)
	if ok {
		return vf, nil
	}

	return 0.0, newWrongTypeError(v, vf)
}
546463
func (dec *Decoder) Float64(v *float64) error {
	err := dec.decodeFloat64(v)
	if err != nil {
		return err
	}
	dec.called |= 1
	return nil
}
801387
func (fa *Float32Array) Float32ArrayOr(or []float32) []float32 {
	switch {
	case fa == nil:
		return or
	case !fa.Valid:
		return or
	default:
		return fa.Float32Array
	}
}
973642
func (p *parserMixin) Float32() (target *float32) {
	target = new(float32)
	p.Float32Var(target)
	return
}
1127330
func FindFloat32(s []float32, cb func(s float32) bool) (float32, bool) {
	for _, i := range s {
		result := cb(i)

		if result {
			return i, true
		}
	}

	return 0.0, false
}
1143755
func Float32(v float32) *float32 {
	p := new(float32)
	*p = v
	return p
}
511138
func (enc *Encoder) WriteFloat32(n float32) error {
	bits := math.Float32bits(n)
	enc.err = enc.buf.WriteByte(byte(bits >> 24))
	if enc.err == nil {
		enc.err = enc.buf.WriteByte(byte(bits >> 16))
		if enc.err == nil {
			enc.err = enc.buf.WriteByte(byte(bits >> 8))
			if enc.err == nil {
				enc.err = enc.buf.WriteByte(byte(bits))
			}
		}
	}
	return enc.err
}
1133161
func (f *Flash) GetFloat32(key string) float32 {
	r, _ := f.Get(key).(float32)
	return r
}
6079
func Float(min, max float64) (float64, error) {
	return min + Rnd.Float64()*(max-min), nil
}
1005842
func (Encoder) AppendFloat32(dst []byte, val float32) []byte {
	return appendFloat(dst, float64(val), 32)
}
707054
func PackFloat32(cmd BufferEx, val float32) (int, error) {
	return packFloat32(cmd, val)
}