Skip to content
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

Merged
merged 5 commits into from
Jun 13, 2019
Merged

implemented shape #9

merged 5 commits into from
Jun 13, 2019

Conversation

haynes1
Copy link

@haynes1 haynes1 commented Jun 10, 2019

No description provided.

src/s2/shape.rs Outdated
}

// sortEdges sorts the slice of Edges in place.
pub fn sortEdges(e: Vec<Edge>) -> Vec<Edge> {

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) }

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()

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;

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.

Alexander Haynes added 2 commits June 10, 2019 15:48
src/r2/point.rs Show resolved Hide resolved
src/r2/point.rs Show resolved Hide resolved
@crgant12 crgant12 merged commit 0fc1bbc into master Jun 13, 2019
@crgant12 crgant12 deleted the shape branch June 13, 2019 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants