utils.ts 245 B

1234567891011
  1. export const utils = {
  2. designToNaturalSize(value: number) {
  3. return value / 2 + "px";
  4. },
  5. pxToDesignSize(value: number) {
  6. return value * 2;
  7. },
  8. designSizeToPx(value: number) {
  9. return value / 2.0;
  10. },
  11. }