cartography 0.11.1

Cartography is a map rendering library for Geographic features expressed using [georust](https://georust.org/) libraries.
Documentation
use geo::{CoordNum, Rect, coord};

/// Create a rectangle from a center and a given width
#[allow(dead_code)]
pub fn from_center_size<T: CoordNum>(x: T, y: T, width: T, height: T) -> Rect<T>
{
  let z_5: T = num_traits::cast(0.5).unwrap();
  Rect::new(
    coord! { x: x - z_5 * width, y: y - z_5 * height },
    coord! {x: x + z_5 * width, y: y + z_5 * height },
  )
}
/// Pan the rectangle by the given amount
#[allow(dead_code)]
pub fn pan<T: CoordNum>(rect: &Rect<T>, x: T, y: T) -> Rect<T>
{
  Rect::new(
    coord! { x: rect.min().x + x, y: rect.min().y + y },
    coord! { x: rect.max().x + x, y: rect.max().y + y },
  )
}