From 030943ab81a363349e2218650ed1ef1d39c2d7e3 Mon Sep 17 00:00:00 2001 From: Kurt Jung Date: Tue, 28 Oct 2014 07:13:31 -0400 Subject: Robert Lillack's Beziergon function with example. Corrections to curve argument names. --- def.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'def.go') diff --git a/def.go b/def.go index 6d12af3..47b399f 100644 --- a/def.go +++ b/def.go @@ -49,6 +49,11 @@ type PointType struct { X, Y float64 } +// XY returns the X and Y components of the receiver point. +func (p PointType) XY() (float64, float64) { + return p.X, p.Y +} + // ImageInfoType contains size, color and other information about an image type ImageInfoType struct { data []byte -- cgit v1.2.1-24-ge1ad