-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implemented shape #9
Conversation
src/s2/shape.rs
Outdated
} | ||
|
||
// sortEdges sorts the slice of Edges in place. | ||
pub fn sortEdges(e: Vec<Edge>) -> Vec<Edge> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably needs to be done like this example https://rust-lang-nursery.github.io/rust-cookbook/algorithms/sorting.html
src/s2/shape.rs
Outdated
|
||
impl Edges { | ||
|
||
pub fn Len(&self, ) -> i64 { len(self) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for go's way of sorting things. You probably don't need this.
src/s2/shape.rs
Outdated
fn IsFull() -> bool; | ||
|
||
// We do not support implementations of this interface outside this package. | ||
privateInterface() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just take this out since it doesn't translate directory from go.
src/s2/shape.rs
Outdated
// certain algorithms such as intersection (see BooleanOperation). | ||
pub trait Shape { | ||
// NumEdges returns the number of edges in this shape. | ||
fn NumEdges() -> i64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename all of these the rust way.
No description provided.