# [−][src]Trait alga::linear::Rotation

    pub trait Rotation<E: EuclideanSpace>: OrthogonalTransformation<E, Rotation = Self> + DirectIsometry<E, Rotation = Self> {
        fn powf(&self, n: E::RealField) -> Option<Self>;
        fn rotation_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self>;
        fn scaled_rotation_between(
            a: &E::Coordinates,
            b: &E::Coordinates,
            s: E::RealField
        ) -> Option<Self>;
    }

Subgroups of the n-dimensional rotation group `SO(n)`.

## Required methods

### `fn powf(&self, n: E::RealField) -> Option<Self>`

Raises this rotation to a power. If this is a simple rotation, the result must be equivalent to multiplying the rotation angle by `n`.

### `fn rotation_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self>`

Computes a simple rotation that makes the angle between `a` and `b` equal to zero, i.e., `b.angle(a * delta_rotation(a, b)) = 0`. If `a` and `b` are collinear, the computed rotation may not be unique. Returns `None` if no such simple rotation exists in the subgroup represented by `Self`.

### `fn scaled_rotation_between(
a: &E::Coordinates,
b: &E::Coordinates,
s: E::RealField
) -> Option<Self>`

Computes the rotation between `a` and `b` and raises it to the power `n`.

This is equivalent to calling `self.rotation_between(a, b)` followed by `.powf(n)` but will usually be much more efficient.

Loading content...

## Implementors

### `impl<E: EuclideanSpace> Rotation<E> for Id`[src]

#### `fn powf(&self, _: E::RealField) -> Option<Self>`[src]

#### `fn rotation_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self>`[src]

#### `fn scaled_rotation_between(
a: &E::Coordinates,
b: &E::Coordinates,
_: E::RealField
) -> Option<Self>`[src]

Loading content...

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)