aboutsummaryrefslogtreecommitdiff
path: root/pkg/pointer/storage-offset.go
blob: 0fcd9ed2934305db39f90b7c4e160862a91e4a9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package pointer

func (p Pointer) GetStorageOffset() (x, y int) {
	return p.sox, p.soy
}

func (p *Pointer) CalculateNewStorageOffset() {
	p.sox, p.soy = p.x+p.delta.x, p.y+p.delta.y
}

func (p *Pointer) SetStorageOffset(x, y int) {
	p.sox, p.soy = x, y
}