From 19b5b115c50d4f418fe83095b4fae5c58bd715e0 Mon Sep 17 00:00:00 2001 From: Cameron Hart Date: Mon, 15 Feb 2021 23:48:21 +1300 Subject: [PATCH] A bit more clarification on transform_point2 and transform_vector3. --- src/mat3.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mat3.rs b/src/mat3.rs index 13b0ed98..4b211aa6 100644 --- a/src/mat3.rs +++ b/src/mat3.rs @@ -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) @@ -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)