Added zero point

This commit is contained in:
Sander Schobers 2017-11-06 07:04:21 +01:00
parent cac351f290
commit fd7d29064c

View File

@ -10,6 +10,9 @@ type PointF struct {
X, Y float64
}
// ZeroPtF is initialized on (0, 0).
var ZeroPtF = PointF{X: 0, Y: 0}
// PtF is a shorthand function to create a point.
func PtF(x, y float64) PointF {
return PointF{X: x, Y: y}