Verified Commit e32fbbac authored by Alex Butler's avatar Alex Butler
Browse files

Inline point(x, y) & vector(x, y)

parent 17718aee
......@@ -31,10 +31,12 @@ pub struct Vector<N> {
pub y: N,
}
/// A convenience function for generating `Point`s.
#[inline]
pub fn point<N>(x: N, y: N) -> Point<N> {
Point { x, y }
}
/// A convenience function for generating `Vector`s.
#[inline]
pub fn vector<N>(x: N, y: N) -> Vector<N> {
Vector { x, y }
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment