Skip to content

Instantly share code, notes, and snippets.

@tbillington
Created August 21, 2014 09:46
Show Gist options
  • Save tbillington/44b96a20c4e75d369428 to your computer and use it in GitHub Desktop.
Save tbillington/44b96a20c4e75d369428 to your computer and use it in GitHub Desktop.
// Geometric vertex (v)
pub struct GeometericVertex {
pub x: f64,
pub y: f64,
pub z: f64,
}
fn new_make_geometric_vertex<Y, T: Index<uint,Y>>(d: T) -> GeometericVertex {
GeometericVertex { x: d[0], y: d[1], z: d[2] }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment