Fixed field order in spherical values in messages
This commit is contained in:
parent
e975f219f4
commit
b34c536c68
@ -5,16 +5,16 @@ public class LowLevelMessages
|
||||
|
||||
public static void SendSpherical(byte[] buffer, ref byte ix, Spherical v)
|
||||
{
|
||||
SendFloat16(buffer, ref ix, new float16(v.distance));
|
||||
SendAngle8(buffer, ref ix, v.horizontal);
|
||||
SendAngle8(buffer, ref ix, v.vertical);
|
||||
SendFloat16(buffer, ref ix, new float16(v.distance));
|
||||
}
|
||||
|
||||
public static Spherical ReceiveSpherical(byte[] data, ref byte ix)
|
||||
{
|
||||
float distance = ReceiveFloat16(data, ref ix);
|
||||
float horizontal = ReceiveAngle8(data, ref ix);
|
||||
float vertical = ReceiveAngle8(data, ref ix);
|
||||
float distance = ReceiveFloat16(data, ref ix);
|
||||
Spherical v = new(distance, horizontal, vertical);
|
||||
return v;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user