Skip to content

Commit

Permalink
rudtdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
ManevilleF committed Dec 22, 2024
1 parent a3f3c7f commit c5f3e08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/direction/edge_direction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ impl EdgeDirection {
/// Returns the unit vector of the direction in the given `orientation`.
///
/// The vector is normalized and in local hex space. To use within a
/// [`HexLayout`] use [`HexLayout::transform_vector`] or [`world_unit_vector`]
/// [`HexLayout`] use [`HexLayout::transform_vector`] or [`Self::world_unit_vector`]
pub fn unit_vector(self, orientation: HexOrientation) -> Vec2 {
let angle = self.angle(orientation);
Vec2::new(angle.cos(), angle.sin())
Expand All @@ -398,7 +398,7 @@ impl EdgeDirection {
/// Returns the unit vector of the direction in the given `layout`.
///
/// The vector is provided in pixel/workd space. To use in local hex
/// space use [`unit_vector`]
/// space use [`Self::unit_vector`]
pub fn world_unit_vector(self, layout: &HexLayout) -> Vec2 {
let vector = self.unit_vector(layout.orientation);
layout.transform_vector(vector)
Expand Down
4 changes: 2 additions & 2 deletions src/direction/vertex_direction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ impl VertexDirection {
/// Returns the unit vector of the direction in the given `orientation`
///
/// The vector is normalized and in local hex space. To use within a
/// [`HexLayout`] use [`HexLayout::transform_vector`] or [`world_unit_vector`]
/// [`HexLayout`] use [`HexLayout::transform_vector`] or [`Self::world_unit_vector`]
pub fn unit_vector(self, orientation: HexOrientation) -> Vec2 {
let angle = self.angle(orientation);
Vec2::new(angle.cos(), angle.sin())
Expand All @@ -399,7 +399,7 @@ impl VertexDirection {
/// Returns the unit vector of the direction in the given `layout`.
///
/// The vector is provided in pixel/workd space. To use in local hex
/// space use [`unit_vector`]
/// space use [`Self::unit_vector`]
pub fn world_unit_vector(self, layout: &HexLayout) -> Vec2 {
let vector = self.unit_vector(layout.orientation);
layout.transform_vector(vector)
Expand Down

0 comments on commit c5f3e08

Please sign in to comment.