public function writeNumber($number)
 {
     if ($number >= -268435456 && $number <= 268435455 && !is_double($number)) {
         parent::write(Datatypes::INTEGER_DATATYPE_V3);
         parent::writeVarInt((int) $number & 0x1fffffff);
     } else {
         parent::write(Datatypes::DOUBLE_DATATYPE_V3);
         parent::writeDouble($number);
     }
 }
Esempio n. 2
0
 public function writeNumber($value)
 {
     parent::write(0);
     parent::writeDouble(floatval($value));
 }