Start to rewrite

This commit is contained in:
9seconds
2018-07-07 16:50:29 +03:00
parent a3933e6ede
commit 41b2b1c819
19 changed files with 603 additions and 565 deletions
+11
View File
@@ -0,0 +1,11 @@
package utils
type Uint24 [3]byte
func ToUint24(number uint32) Uint24 {
return Uint24{byte(number), byte(number >> 8), byte(number >> 16)}
}
func FromUint24(number Uint24) uint32 {
return uint32(number[0]) + (uint32(number[1]) << 8) + (uint32(number[2]) << 16)
}