import "image" // Create a new PointY with coordinates (3, 4) p := image.PointY{X: 3, Y: 4}
import "image" // Create two points p1 := image.PointY{X: 3, Y: 4} p2 := image.PointY{X: 5, Y: 6} // Add the two points together p3 := p1.Add(p2) // p3 is now PointY{X: 8, Y: 10}
import "image" // Create a point p1 := image.PointY{X: 3, Y: 4} // Scale the point by a factor of 2 p2 := p1.Mul(2) // p2 is now PointY{X: 6, Y: 8}All of these examples use the `image` package in the Go standard library.