Function geo_nd::vector::fmt

source ·
pub fn fmt<V: Num>(f: &mut Formatter<'_>, v: &[V]) -> Result
Expand description

Format the vector for display

Examples

use geo_nd::vector;
struct Pt { c : [f32;2] };
impl std::fmt::Display for Pt {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { vector::fmt(f, &self.c) }
}
assert_eq!( format!("{}", &Pt{c:[0., 1.]} ), "(0,1)" );