rename Vec.Apply -> Vec.Map
This commit is contained in:
parent
a7fdbd618e
commit
77c39d03c7
|
@ -97,9 +97,9 @@ func (u Vec) Cross(v Vec) float64 {
|
||||||
return u.X()*v.Y() - v.X()*u.Y()
|
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.
|
// vector.
|
||||||
func (u Vec) Apply(f func(float64) float64) Vec {
|
func (u Vec) Map(f func(float64) float64) Vec {
|
||||||
return V(
|
return V(
|
||||||
f(u.X()),
|
f(u.X()),
|
||||||
f(u.Y()),
|
f(u.Y()),
|
||||||
|
|
Loading…
Reference in New Issue