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

WIP: Intersections #11

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

omnisci3nce
Copy link

Just opening a draft PR in case anyone has feedback or improvements.

Comment on lines 71 to 81
#[inline]
fn within_range(x: f64, a: f64, b: f64, epsilon: f64) -> bool {
if a == b && b == x {
return true;
}
if a < b {
x >= a - epsilon && x <= b + epsilon
} else {
x >= b - epsilon && x <= a + epsilon
}
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied this from the Cadmium repository except removed the retvat and just return inline.

@TobiasJacob
Copy link
Collaborator

Great that you start working on this. Can you move each collision function into its own file?

@omnisci3nce
Copy link
Author

omnisci3nce commented May 27, 2024 via email

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