2021-09-21 00:27:57 +02:00
|
|
|
package pointer
|
|
|
|
|
|
|
|
func (p Pointer) GetStorageOffset() (x, y int) {
|
|
|
|
return p.sox, p.soy
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Pointer) CalculateNewStorageOffset() {
|
2021-09-21 15:41:52 +02:00
|
|
|
p.sox, p.soy = p.x+p.dx, p.y+p.dy
|
2021-09-21 00:27:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Pointer) SetStorageOffset(x, y int) {
|
|
|
|
p.sox, p.soy = x, y
|
|
|
|
}
|