From 77c39d03c7585ef1fbeb0c843fa4d44debb07fd9 Mon Sep 17 00:00:00 2001 From: faiface <faiface@ksp.sk> Date: Wed, 1 Mar 2017 23:13:14 +0100 Subject: [PATCH] rename Vec.Apply -> Vec.Map --- geometry.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geometry.go b/geometry.go index d89217f..9651d3c 100644 --- a/geometry.go +++ b/geometry.go @@ -97,9 +97,9 @@ func (u Vec) Cross(v Vec) float64 { return u.X()*v.Y() - v.X()*u.Y() } -// Apply applies the function f to both x and y components of the vector u and returns the modified +// Map applies the function f to both x and y components of the vector u and returns the modified // vector. -func (u Vec) Apply(f func(float64) float64) Vec { +func (u Vec) Map(f func(float64) float64) Vec { return V( f(u.X()), f(u.Y()), -- GitLab