16 Commits

Author SHA1 Message Date
Connor Skees
65b281d1f7 reduce size of Unit enum 2020-07-08 21:39:30 -04:00
Connor Skees
57562b52d3 map equality is independent of order 2020-07-07 01:06:22 -04:00
Connor Skees
b28309147e partially implement inverse units 2020-07-04 11:04:51 -04:00
ConnorSkees
369feb5c40 use clearer naming for Number variants 2020-06-26 08:47:10 -04:00
ConnorSkees
a04bc40129 make Unit and Number structs smaller 2020-06-26 04:55:00 -04:00
ConnorSkees
c1b5ff5730 prettify imports 2020-06-16 20:00:11 -04:00
ConnorSkees
8520048b26 implement small int optimizations
This allows for numbers within 18 digits of precision (the vast
majority of numbers) to be represented by just 2 i64s rather than 2 heap
allocated BigInts. In the future these optimizations may become more
aggressive and granular, but for now `grass` is already more than an order of
magnitude faster than `dart-sass`.
2020-05-19 23:23:04 -04:00
ConnorSkees
1b774a9b91 simplify Unit::From<String> 2020-05-06 12:01:40 -04:00
ConnorSkees
01858ff543 use static strings inside unit conversion table 2020-05-06 11:55:49 -04:00
ConnorSkees
80dfc161b2 remove unused Into<String> for Unit 2020-04-26 22:23:56 -04:00
ConnorSkees
09ee456b96 explicitly match on all units in Unit::kind 2020-04-17 13:12:06 -04:00
ConnorSkees
de78c1147a manually resolve some formatting issues 2020-04-17 13:06:54 -04:00
ConnorSkees
bb87d4f4c0 handle percent op none 2020-03-31 02:11:02 -04:00
ConnorSkees
0be8828bf0 make better use of num traits 2020-03-22 22:28:54 -04:00
ConnorSkees
4954f4bc6a better docs for colors 2020-03-19 16:40:30 -04:00
ConnorSkees
dcb712e3d4 Refactor unit conversions into separate file 2020-03-19 16:24:31 -04:00