Skip to content

Commit

Permalink
- add doc comments to defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
polymonster committed Sep 12, 2023
1 parent 686dc6d commit 70a73f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/mat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ macro_rules! mat_impl {
}
}

/// default to identity matrix
impl<T> Default for $MatN<T> where T: Number {
fn default() -> Self {
Self::identity()
Expand Down
1 change: 1 addition & 0 deletions src/quat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ impl<T> Mul<&Vec3<T>> for &Quat<T> where T: Number {
}
}

/// default to identity quaternion
impl<T> Default for Quat<T> where T: Float + FloatOps<T> + SignedNumberOps<T> {
fn default() -> Self {
Self::identity()
Expand Down
1 change: 1 addition & 0 deletions src/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,7 @@ macro_rules! vec_impl {
}
}

/// default to zero
impl<T> Default for $VecN<T> where T: Number {
fn default() -> Self {
Self::zero()
Expand Down

0 comments on commit 70a73f0

Please sign in to comment.