add types.go
This commit is contained in:
parent
9ec3f04c16
commit
706b6e107b
14
atom/types.go
Normal file
14
atom/types.go
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
package atom
|
||||||
|
|
||||||
|
type Fixed uint32
|
||||||
|
type TimeStamp uint32
|
||||||
|
|
||||||
|
func IntToFixed(val int) Fixed {
|
||||||
|
return Fixed(val<<16)
|
||||||
|
}
|
||||||
|
|
||||||
|
func FixedToInt(val Fixed) int {
|
||||||
|
return int(val>>16)
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user