Trait krakel::PointTrait
source · pub trait PointTrait: Clone + PartialEqwhere
Self::PScalar: Real + FromPrimitive + UlpsEq + Debug + Display + PartialEq + MulAssign + SubAssign + DivAssign + AddAssign,{
type PScalar;
const DIMENSION: u8;
// Required methods
fn x(&self) -> Self::PScalar;
fn y(&self) -> Self::PScalar;
fn set_x(&mut self, x: Self::PScalar);
fn set_y(&mut self, y: Self::PScalar);
fn at(&self, index: u8) -> Self::PScalar;
fn at_mut(&mut self, index: u8) -> &mut Self::PScalar;
// Provided method
fn dist_sq<Q: PointTrait<PScalar = Self::PScalar>>(
a: &Self,
b: &Q
) -> Self::PScalar { ... }
}Required Associated Types§
Required Associated Constants§
Required Methods§
fn x(&self) -> Self::PScalar
fn y(&self) -> Self::PScalar
fn set_x(&mut self, x: Self::PScalar)
fn set_y(&mut self, y: Self::PScalar)
fn at(&self, index: u8) -> Self::PScalar
fn at_mut(&mut self, index: u8) -> &mut Self::PScalar
Provided Methods§
Object Safety§
This trait is not object safe.