2022-02-23 05:14:32 +00:00
|
|
|
|
namespace MoonWorks
|
2021-01-20 03:33:27 +00:00
|
|
|
|
{
|
2022-02-23 05:14:32 +00:00
|
|
|
|
public static class Conversions
|
|
|
|
|
{
|
|
|
|
|
public static byte BoolToByte(bool b)
|
|
|
|
|
{
|
|
|
|
|
return (byte) (b ? 1 : 0);
|
|
|
|
|
}
|
2021-01-22 22:41:34 +00:00
|
|
|
|
|
2022-02-23 05:14:32 +00:00
|
|
|
|
public static bool ByteToBool(byte b)
|
|
|
|
|
{
|
2022-02-25 05:34:36 +00:00
|
|
|
|
return b != 0;
|
2022-02-23 05:14:32 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2021-01-20 03:33:27 +00:00
|
|
|
|
}
|