Add unit type to rotation and skew methods
See original GitHub issueSomething that allows you to specify the unit for rotation, such as rad or turn
Rematrix.rotate(0.5, 'rad')
perhaps?
Units
- deg — Degrees. There are 360 degrees in a full circle.
- grad — Gradians, also known as “gons” or “grades”. There are 400 gradians in a full circle.
- rad — Radians. There are 2π radians in a full circle.
- turn — Turns. There is 1 turn in a full circle.
Source: https://drafts.csswg.org/css-values-3/#angles
Re: #1
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
skew() - CSS: Cascading Style Sheets - MDN Web Docs
The skew() CSS function defines a transformation that skews an element on the 2D plane. Its result is a <transform-function> data type.
Read more >Coordinate Systems, Transformations and Units – SVG Tiny 1.2
7 Coordinate Systems, Transformations and Units ... and represent the usual method of controlling the size, position, rotation and skew of graphic objects....
Read more >Lecture 18: Rotation and How to Represent It, Unit ... - YouTube
MIT 6.801 Machine Vision, Fall 2020Instructor: Berthold HornView the complete course: https://ocw.mit.edu/6-801F20YouTube Playlist: ...
Read more >Rotations, Orientation, and Quaternions - MATLAB & Simulink
This example reviews concepts in three-dimensional rotations and how quaternions are used to describe orientation and rotations. Quaternions are a skew ...
Read more >CSS 2D Transforms - W3Schools
The matrix() method take six parameters, containing mathematic functions, which allows you to rotate, scale, move (translate), and skew elements. The parameters ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I rather like the first suggestion, as it handles two arguments passed to
skew
nicely:Another option: (not a breaking change, just add static methods to the
rotate()
function)