writeFloat() public static method

public static writeFloat ( $value )
コード例 #1
0
 public function putFloat($v)
 {
     $this->buffer .= Binary::writeFloat($v);
 }
コード例 #2
0
ファイル: LevelFormat.php プロジェクト: rryy/PocketMine-MP
 public function saveData()
 {
     $this->levelData["version"] = self::VERSION;
     @ftruncate($this->fp, 5);
     $this->seek(5);
     $this->write(chr($this->levelData["version"]));
     $this->write(Binary::writeShort(strlen($this->levelData["name"])) . $this->levelData["name"]);
     $this->write(Binary::writeInt($this->levelData["seed"]));
     $this->write(Binary::writeInt($this->levelData["time"]));
     $this->write(Binary::writeFloat($this->levelData["spawnX"]));
     $this->write(Binary::writeFloat($this->levelData["spawnY"]));
     $this->write(Binary::writeFloat($this->levelData["spawnZ"]));
     $this->write(chr($this->levelData["height"]));
     $this->write(Binary::writeShort(strlen($this->levelData["generator"])) . $this->levelData["generator"]);
     $settings = serialize($this->levelData["generatorSettings"]);
     $this->write(Binary::writeShort(strlen($settings)) . $settings);
     $extra = zlib_encode($this->levelData["extra"], self::ZLIB_ENCODING, self::ZLIB_LEVEL);
     $this->write(Binary::writeShort(strlen($extra)) . $extra);
 }
コード例 #3
0
ファイル: NBT.php プロジェクト: ianju/PocketMine-MP
 public function putFloat($v)
 {
     $this->buffer .= $this->endianness === self::BIG_ENDIAN ? Binary::writeFloat($v) : Binary::writeLFloat($v);
 }
コード例 #4
0
 protected function putFloat($v)
 {
     $this->buffer .= Binary::writeFloat($v);
 }