public PropToVector3 ( byte buff ) : System.Vector3 | ||
buff | byte | |
Результат | System.Vector3 |
public Vector3 PropToVector3(byte[] buff)
{
Vector3 v = new Vector3(0, 0, 0);
if (buff == null || buff.Length < 12)
return v;
v.X = BitConverter.ToSingle(buff, buff.Length - 12);
v.Y = BitConverter.ToSingle(buff, buff.Length - 8);
v.Z = BitConverter.ToSingle(buff, buff.Length - 4);
return v;
}