-
Notifications
You must be signed in to change notification settings - Fork 62
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
Conversation
type signatures. [ci skip]
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. |
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.
Should be "at least three"
Looks good to me apart from the minor comments above. |
3D scaling, alignment, coordinate lenses
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?