From fd7d29064cb1b9f851bcacb57ed72b1e6d82c959 Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Mon, 6 Nov 2017 07:04:21 +0100 Subject: [PATCH] Added zero point --- pointf.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pointf.go b/pointf.go index c18a04d..0a397a7 100644 --- a/pointf.go +++ b/pointf.go @@ -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}