MCPcopy Create free account
hub / github.com/TyphoonMC/TyphoonCore / WriteFloat32

Method WriteFloat32

utils.go:179–187  ·  view source on GitHub ↗
(i float32)

Source from the content-addressed store, hash-verified

177}
178
179func (player *Player) WriteFloat32(i float32) (err error) {
180 buff := player.io.buffer[:4]
181 binary.BigEndian.PutUint32(buff, math.Float32bits(i))
182 _, err = player.io.wtr.Write(buff)
183 if err != nil {
184 return err
185 }
186 return
187}
188
189func (player *Player) ReadFloat64() (i float64, err error) {
190 buff := player.io.buffer[:8]

Callers 4

writePropertiesMethod · 0.80
WriteMethod · 0.80
WriteMethod · 0.80
WriteMethod · 0.80

Calls 1

WriteMethod · 0.65

Tested by

no test coverage detected