-
Notifications
You must be signed in to change notification settings - Fork 52
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
Upstream some Diagrams utilities #180
Comments
Similarly, I wonder if it would make more sense for -- | Create a unit vector in a negative direction.
--
-- >>> unitNeg _x :: V2 Int
-- V2 (-1) 0
unitNeg :: (Additive t, Num a) => ASetter' (t a) a -> t a
unitNeg l = set' l (-1) zero |
Oh nice, I hadn't noticed
Yeah, I think that'd make sense, although using |
You can also write |
I'd also quite like to see these, although they might be less general than the reflectX :: (R1 v, Num n) => v n -> v n
reflectX = lensVL _x %~ negate
reflectY :: (R2 v, Num n) => v n -> v n
reflectY = lensVL _y %~ negate |
In a similar vein to #40, there are various definitions in the
diagrams-lib
library which seem like they'd be useful here. Personally I've ended up vendoring the following becausediagrams-lib
can be a bit of a problematic dependency (it has a big footprint, and doesn't work with Wasm for example: diagrams/diagrams-lib#370):Would you consider copying some of these to this library?
Cc @byorgey
The text was updated successfully, but these errors were encountered: