Fix some documentation
This commit is contained in:
parent
34da833e39
commit
def53ca371
2 changed files with 5 additions and 1 deletions
|
@ -80,12 +80,14 @@ impl<S: BaseNum> Point3<S> {
|
||||||
macro_rules! impl_point {
|
macro_rules! impl_point {
|
||||||
($PointN:ident { $($field:ident),+ }, $VectorN:ident, $n:expr) => {
|
($PointN:ident { $($field:ident),+ }, $VectorN:ident, $n:expr) => {
|
||||||
impl<S> $PointN<S> {
|
impl<S> $PointN<S> {
|
||||||
/// Construct a new vector, using the provided values.
|
/// Construct a new point, using the provided values.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn new($($field: S),+) -> $PointN<S> {
|
pub fn new($($field: S),+) -> $PointN<S> {
|
||||||
$PointN { $($field: $field),+ }
|
$PointN { $($field: $field),+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Perform the given operation on each field in the point, returning a new point
|
||||||
|
/// constructed from the operations.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn map<U, F>(self, mut f: F) -> $PointN<U>
|
pub fn map<U, F>(self, mut f: F) -> $PointN<U>
|
||||||
where F: FnMut(S) -> U
|
where F: FnMut(S) -> U
|
||||||
|
|
|
@ -102,6 +102,8 @@ macro_rules! impl_vector {
|
||||||
$VectorN { $($field: $field),+ }
|
$VectorN { $($field: $field),+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Perform the given operation on each field in the vector, returning a new point
|
||||||
|
/// constructed from the operations.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn map<U, F>(self, mut f: F) -> $VectorN<U>
|
pub fn map<U, F>(self, mut f: F) -> $VectorN<U>
|
||||||
where F: FnMut(S) -> U
|
where F: FnMut(S) -> U
|
||||||
|
|
Loading…
Reference in a new issue