generated from tipragot/rust
Adding a map creation plugin #57
|
@ -249,9 +249,10 @@ impl<T: Number> HexPosition<T> {
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use border_wars::map::hex::HexPosition;
|
/// use border_wars::map::hex::HexPosition;
|
||||||
|
/// use bevy::math::Vec2;
|
||||||
///
|
///
|
||||||
/// let position = HexPosition(1, 0);
|
/// let position = HexPosition(1, 0);
|
||||||
/// assert_eq!(position.to_pixel_coordinates(), (3f32.sqrt(), 0.0));
|
/// assert_eq!(position.to_pixel_coordinates(), Vec2::new(3f32.sqrt(), 0.0));
|
||||||
/// ```
|
/// ```
|
||||||
pub fn to_pixel_coordinates(&self) -> Vec2 {
|
pub fn to_pixel_coordinates(&self) -> Vec2 {
|
||||||
Vec2::new(
|
Vec2::new(
|
||||||
|
|
Loading…
Reference in a new issue