From def53ca3719cbe5c78cec54aabee477538ec6981 Mon Sep 17 00:00:00 2001 From: Osspial Date: Fri, 16 Mar 2018 16:32:46 -0400 Subject: [PATCH] Fix some documentation --- src/point.rs | 4 +++- src/vector.rs | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/point.rs b/src/point.rs index 1291495..df5a299 100644 --- a/src/point.rs +++ b/src/point.rs @@ -80,12 +80,14 @@ impl Point3 { macro_rules! impl_point { ($PointN:ident { $($field:ident),+ }, $VectorN:ident, $n:expr) => { impl $PointN { - /// Construct a new vector, using the provided values. + /// Construct a new point, using the provided values. #[inline] pub fn new($($field: S),+) -> $PointN { $PointN { $($field: $field),+ } } + /// Perform the given operation on each field in the point, returning a new point + /// constructed from the operations. #[inline] pub fn map(self, mut f: F) -> $PointN where F: FnMut(S) -> U diff --git a/src/vector.rs b/src/vector.rs index 4f111ac..108792a 100644 --- a/src/vector.rs +++ b/src/vector.rs @@ -102,6 +102,8 @@ macro_rules! impl_vector { $VectorN { $($field: $field),+ } } + /// Perform the given operation on each field in the vector, returning a new point + /// constructed from the operations. #[inline] pub fn map(self, mut f: F) -> $VectorN where F: FnMut(S) -> U