Skip to content

Instantly share code, notes, and snippets.

@mootinator
Created March 7, 2017 04:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mootinator/e876bfc71f753dfbd63f5af0c18b9231 to your computer and use it in GitHub Desktop.
Save mootinator/e876bfc71f753dfbd63f5af0c18b9231 to your computer and use it in GitHub Desktop.
public byte[] AsByteArray()
{
// Represents little endian point on unit circle
var result = new byte[] { 0xE6, 0x10, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
Buffer.BlockCopy(BitConverter.GetBytes(Longitude), 0, result, 9, 8);
Buffer.BlockCopy(BitConverter.GetBytes(Latitude), 0, result, 17, 8);
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment