playMaker

Author Topic: how to rounding a float [SOLVED]  (Read 1901 times)

KonstantinSmirnov

  • Playmaker Newbie
  • *
  • Posts: 6
how to rounding a float [SOLVED]
« on: October 05, 2017, 10:05:40 PM »
Hello!
I'm a beginner, have a some problem: when i'm adding a 0.1 float, sometimes Unity shows like 0.800000001. How to receive it to 0.8 always? Thank you!

p.s. sorry for my English
« Last Edit: October 07, 2017, 06:20:50 AM by djaydino »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: how to rounding a float
« Reply #1 on: October 05, 2017, 10:41:50 PM »
Hi,
You can find some action for that on the Ecosystem

a few i can see are :

Float Round
Float Round To Nearest
Float Decimal Count

KonstantinSmirnov

  • Playmaker Newbie
  • *
  • Posts: 6
Re: how to rounding a float
« Reply #2 on: October 06, 2017, 11:48:26 AM »
Thank you! Its work amazing!!!!! I using float round to nearest.