skadistats.clarity.io.decoder.VectorXYDecoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clarity Show documentation
Show all versions of clarity Show documentation
Clarity is an open source replay parser for Dota 2, CSGO, CS2 and Deadlock written in Java.
package skadistats.clarity.io.decoder;
import skadistats.clarity.io.bitstream.BitStream;
import skadistats.clarity.model.Vector;
public class VectorXYDecoder implements Decoder {
private final Decoder floatDecoder;
public VectorXYDecoder(Decoder floatDecoder) {
this.floatDecoder = floatDecoder;
}
@Override
public Vector decode(BitStream bs) {
return new Vector(
floatDecoder.decode(bs),
floatDecoder.decode(bs)
);
}
}