private static uint Pack(float x, float y) { uint word1 = PackHelpers.PackSigned(ushort.MaxValue, x); uint word2 = PackHelpers.PackSigned(ushort.MaxValue, y) << 16; return(word1 | word2); }
private static ulong Pack(float x, float y, float z, float w) { ulong word1 = PackHelpers.PackSigned(ushort.MaxValue, x); ulong word2 = (ulong)PackHelpers.PackSigned(ushort.MaxValue, y) << 16; ulong word3 = (ulong)PackHelpers.PackSigned(ushort.MaxValue, z) << 32; ulong word4 = (ulong)PackHelpers.PackSigned(ushort.MaxValue, w) << 48; return(word1 | word2 | word3 | word4); }