Skip to content

Commit

Permalink
A bit more clarification on transform_point2 and transform_vector3.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitshifter committed Feb 15, 2021
1 parent ac4124b commit 19b5b11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mat3.rs
Expand Up @@ -280,6 +280,8 @@ macro_rules! impl_mat3_methods {
/// Transforms the given 2D vector as a point.
///
/// This is the equivalent of multiplying `other` as a 3D vector where `z` is `1`.
///
/// This method assumes that `self` contains a valid affine transform.
#[inline(always)]
pub fn transform_point2(&self, other: $vec2) -> $vec2 {
self.transform_point2_as_vec3a(other)
Expand All @@ -288,6 +290,8 @@ macro_rules! impl_mat3_methods {
/// Rotates the given 2D vector.
///
/// This is the equivalent of multiplying `other` as a 3D vector where `z` is `0`.
///
/// This method assumes that `self` contains a valid affine transform.
#[inline(always)]
pub fn transform_vector2(&self, other: $vec2) -> $vec2 {
self.transform_vector2_as_vec3a(other)
Expand Down

0 comments on commit 19b5b11

Please sign in to comment.