All Downloads are FREE. Search and download functionalities are using the official Maven repository.

skadistats.clarity.io.decoder.QAngleNoBitCountDecoder Maven / Gradle / Ivy

Go to download

Clarity is an open source replay parser for Dota 2, CSGO, CS2 and Deadlock written in Java.

There is a newer version: 3.1.1
Show newest version
package skadistats.clarity.io.decoder;

import skadistats.clarity.io.bitstream.BitStream;
import skadistats.clarity.model.Vector;

public class QAngleNoBitCountDecoder implements Decoder {

    @Override
    public Vector decode(BitStream bs) {
        var v = new float[3];
        var b0 = bs.readBitFlag();
        var b1 = bs.readBitFlag();
        var b2 = bs.readBitFlag();
        if (b0) v[0] = bs.readBitCoord();
        if (b1) v[1] = bs.readBitCoord();
        if (b2) v[2] = bs.readBitCoord();
        return new Vector(v);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy