-
Notifications
You must be signed in to change notification settings - Fork 22
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
Make Parameters work #42
Conversation
src/math/interp.rs
Outdated
pub struct InterpRange<T> { | ||
pub beg: T, | ||
pub end: T, | ||
beg: T, | ||
end: T, | ||
} | ||
|
||
impl<T> InterpRange<T> { | ||
#[inline] | ||
pub fn new(beg: T, end: T) -> Self { | ||
Self { beg, end } | ||
} | ||
|
||
pub fn begin(self) -> T { | ||
self.beg | ||
} | ||
|
||
pub fn end(self) -> T { | ||
self.end | ||
} | ||
} |
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.
There is no benefit to this
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.
Was there when I added an assert in new for begin <= end
, I'll revert
#[derive(Clone, Copy, Debug)] | ||
pub struct Transform { |
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.
Are you sure it's ok to make the Transform
copy? It seems like it's already a heavy struct
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.
Hmmm ideally we shouldn't copy Transform
that much yeah, but idk if making if !Copy
is the way to achieve that.
Thank you @carbotaniuman