mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
syntax
This commit is contained in:
parent
572ce6c751
commit
1666bf5309
@ -105,17 +105,6 @@ public void CompressAndDecompressQuaternion_90DegreeEuler()
|
||||
Assert.That(Mathf.Abs(angle), Is.LessThanOrEqualTo(1));
|
||||
}
|
||||
|
||||
// client sending invalid data should still produce valid quaternions to
|
||||
// avoid any possible bugs on server
|
||||
[Test]
|
||||
public void DecompressQuaternionInvalidData()
|
||||
{
|
||||
// decompress
|
||||
// 0xFFFFFFFF will decompress to (0.7, 0.7, 0.7, NaN)
|
||||
Quaternion decompressed = Compression.DecompressQuaternion(0xFFFFFFFF);
|
||||
Assert.That(decompressed, Is.EqualTo(Quaternion.identity));
|
||||
}
|
||||
|
||||
// test for issue https://github.com/vis2k/Mirror/issues/2674
|
||||
[Test]
|
||||
public void CompressAndDecompressQuaternion_2674()
|
||||
@ -141,6 +130,17 @@ public void CompressAndDecompressQuaternion_2674()
|
||||
Assert.That(Mathf.Abs(angle), Is.LessThanOrEqualTo(1));
|
||||
}
|
||||
|
||||
// client sending invalid data should still produce valid quaternions to
|
||||
// avoid any possible bugs on server
|
||||
[Test]
|
||||
public void DecompressQuaternionInvalidData()
|
||||
{
|
||||
// decompress
|
||||
// 0xFFFFFFFF will decompress to (0.7, 0.7, 0.7, NaN)
|
||||
Quaternion decompressed = Compression.DecompressQuaternion(0xFFFFFFFF);
|
||||
Assert.That(decompressed, Is.EqualTo(Quaternion.identity));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void VarInt()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user