コード例 #1
0
ファイル: Unions.cs プロジェクト: akiyoshi515/NoOvertime
            public static float ToValue(byte[] table, int index)
            {
                UnionFloat bt = new UnionFloat();

                bt.SetBytes(table, index);
                return(bt.value);
            }
コード例 #2
0
ファイル: UnityUnions.cs プロジェクト: akiyoshi515/NoOvertime
            public int SetBytes(byte[] table, int index)
            {
                if (table == null)
                {
                    throw new System.ArgumentNullException();
                }
                if (table.Length < index + Size)
                {
                    throw new System.ArgumentOutOfRangeException();
                }

                int idx = index;

                idx += m_x.SetBytes(table, idx);
                idx += m_y.SetBytes(table, idx);

                return(Size);
            }