public static byte RadianToByte(float radian) { var degree = (radian / Math.PI * 180f); return (byte)(degree * 255 / 360f); }