MCPcopy Create free account
hub / github.com/apache/avro / floatToIntBits

Method floatToIntBits

lang/php/lib/Datum/AvroIOBinaryEncoder.php:145–148  ·  view source on GitHub ↗

* Performs encoding of the given float value to a binary string * * XXX: This is not endian-aware! The Avro::checkPlatform() * called in AvroIOBinaryEncoder::__construct() should ensure the * library is only used on little-endian platforms, which ensure the little-endian * encoding required by the Avro spec. * * @param float $float * @

($float)

Source from the content-addressed store, hash-verified

143 * @see Avro::checkPlatform()
144 */
145 public static function floatToIntBits($float)
146 {
147 return pack('g', (float) $float);
148 }
149
150 /**
151 * @param float $datum

Callers 6

writeFloatMethod · 0.95
equalsMethod · 0.80
hashCodeMethod · 0.80
equalsMethod · 0.80
hashCodeMethod · 0.80
hashCodeMethod · 0.80

Calls

no outgoing calls

Tested by 5

equalsMethod · 0.64
hashCodeMethod · 0.64
equalsMethod · 0.64
hashCodeMethod · 0.64
hashCodeMethod · 0.64