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

3D scaling, alignment, coordinate lenses #129

Merged
merged 9 commits into from
Oct 17, 2013
Merged

3D scaling, alignment, coordinate lenses #129

merged 9 commits into from
Oct 17, 2013

Conversation

bergey
Copy link
Member

@bergey bergey commented Oct 17, 2013

This is my last addition of 3D features before the freeze. I'll finish the CSG stuff after 1.0.

I'm not sure if the coordinate lenses in 6f82ca4 are a good idea. I modeled them after their equivalents in linear. They make writing the scaling in 62d6647 really nice. Do they undermine type safety and the distinction between points & vectors too much?

@byorgey
Copy link
Member

byorgey commented Oct 17, 2013

No, I like the coordinate lenses. I don't think they undermine type safety any more than the existing Coordinate stuff already does. I have actually wanted something like this on several occasions (being able to project out just the x- or y-coordinates of a 2D vector or point).

class HasY t where
_y :: Lens' t Double

-- | The class of types with at least two coordinates, the third called _z.
Copy link
Member

Choose a reason for hiding this comment

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

Should be "at least three"

@byorgey
Copy link
Member

byorgey commented Oct 17, 2013

Looks good to me apart from the minor comments above.

byorgey added a commit that referenced this pull request Oct 17, 2013
3D scaling, alignment, coordinate lenses
@byorgey byorgey merged commit 5df233d into master Oct 17, 2013
@bergey bergey deleted the 3D-util branch December 9, 2013 03:36
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