diff --git a/src/traits/rotation.rs b/src/traits/rotation.rs index c4a7c69a..1aa548e7 100644 --- a/src/traits/rotation.rs +++ b/src/traits/rotation.rs @@ -48,3 +48,17 @@ pub fn rotate_wrt_point, res } + +/** + * Applies a rotation centered on the input translation. + * + * - `m`: the object to be rotated. + * - `ammount`: the rotation to apply. + */ +#[inline] +pub fn rotate_wrt_center + Translation, + M2: Rotation + Translation, + LV: Neg, + AV> + (m: &M, ammount: &AV) -> M2 +{ rotate_wrt_point(m, ammount, &m.translation()) }