Timothy J. Warren
6f51f441e3
All checks were successful
timw4mail/gilo/pipeline/head This commit looks good
19 lines
221 B
Go
19 lines
221 B
Go
package gilo
|
|
|
|
type Point struct {
|
|
X int
|
|
Y int
|
|
}
|
|
|
|
func DefaultPoint() *Point {
|
|
return &Point{0, 0}
|
|
}
|
|
|
|
func NewPoint(x, y int) *Point {
|
|
return &Point{x, y}
|
|
}
|
|
|
|
func (p *Point) Clone() *Point {
|
|
return &Point{p.X, p.Y}
|
|
}
|