minecraft_command_types/rotation.rs
1use minecraft_command_types_derive::HasMacro;
2use ordered_float::NotNan;
3use std::fmt::{Display, Formatter};
4
5#[derive(Debug, Clone, Eq, PartialEq, Hash, Ord, PartialOrd, HasMacro)]
6pub struct Rotation(pub NotNan<f32>, pub NotNan<f32>);
7
8impl Display for Rotation {
9 fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
10 write!(f, "{} {}", self.0, self.1)
11 }
12}