5 Rappen CHF rounding (Rounding to nearest 5 cents) + Swiss Franc + Angular Pipe

How would you implement conversation logic for below requirements?

For example,

  • Values between CHF 0,975 and CHF 1,024 will be rounded to CHF 1,00
  • Values between CHF 1,025 and CHF 1,074 will be rounded to CHF 1,05
  • Values between CHF 1,075 and CHF 1,124…

--

--

Google Developer Expert Angular | Architect | Author | https://www.linkedin.com/in/balram-chavan | https://www.hiretheauthor.com/balramchavan

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store