Idea: toFloat or toNumber method
trusktr opened this issue ยท 1 comments
trusktr commented
Numbers can be faster than strings, f.e. when working with the and passing them into WebGL.
It'd be nice to have a method like toFloat
, which converts to the numerical equivalent of hex values. F.e. #ffffff
would be the same as the JS number 0xffffff
. An optional parameter might also allow the value to be represented as a number between 0 and 1 (common in WebGL). 1
would be equivalent to 0xffffff
.
scttcper commented
๐ This issue has been resolved in version 3.1.0 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐