Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
redox-os
rusttype
Commits
e32fbbac
Verified
Commit
e32fbbac
authored
Mar 21, 2018
by
Alex Butler
Browse files
Inline point(x, y) & vector(x, y)
parent
17718aee
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/geometry.rs
View file @
e32fbbac
...
...
@@ -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
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment