using System;

namespace SocketToMe.Extensions
{
    public static class SingleExtensions
    {
        public static byte[] GetBigEndianBytes(this Single value)
        {
            var data = BitConverter.GetBytes(value);
            if (BitConverter.IsLittleEndian) Array.Reverse(data);
            return data;
        }
    }
}