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

Make Parameters work #42

Merged
merged 5 commits into from
Apr 21, 2023
Merged

Conversation

Speykious
Copy link
Member

Thank you @carbotaniuman

Comment on lines 28 to 46
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
}
}
Copy link
Member Author

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

Copy link
Contributor

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

Comment on lines +5 to 6
#[derive(Clone, Copy, Debug)]
pub struct Transform {
Copy link
Member Author

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

Copy link
Contributor

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.

@Speykious Speykious merged commit 78211cd into Inochi2D:parameters Apr 21, 2023
@carbotaniuman carbotaniuman deleted the parameters branch July 19, 2023 11:10
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