Skip to main content
Question

Are decimal numbers ok?

  • February 12, 2024
  • 4 replies
  • 348 views

romanusname

I know that decimal numbers in a project are bad practice. But sometimes it’s okay?

For example, I scale a frame inside which is an icon made of two vectors.

I’m a beginner freelancer and I want to learn how to do it right

This topic has been closed for replies.

4 replies

Gleb
  • Power Member
  • February 12, 2024

99.99% of the time it’s not ok


romanusname
  • Author
  • New Member
  • February 12, 2024

Please tell me. There is an icon frame with vectors inside it. If vectors have decimal size values, is this normal or is it also bad practice?


romanusname
  • Author
  • New Member
  • February 12, 2024

If I understand correctly, decimal values ​​are unacceptable in those places with which a front-end developer will interact. Naturally, it will not transfer each vector svg icon separately. Therefore, they can be left fractional, scaling the parent frame. Right?)


Gleb
  • Power Member
  • February 12, 2024

In case of icons you need to avoid decimal values in order for the icon to render correctly without anti-aliasing issues. If you have decimal values in straight lines or corners, such objects would render blurry on the screen.