Rounding up 5 in equations

Hi all.

I use equations to set up a production, I need to round a rating up to the next 5.

Does anyone have an idea.

Kind regards.

 

Thank you in advance.

Here is a mathematical method that works for all rounding:

Variables:

  • A is the value of rounding
  • B varies according to the crossing threshold: 
    • B=0 --> Lower value
    • B=0.5 --> rounded down if less than half a difference and higher if a value greater than half a difference
    • B=0.99 --> rounded up
  • C is the Value to be rounded

The equation:

  • A x integer(B + C / A)
  • In your case A = 5 and for the higher value B = 0.99

5 x Whole(0.99+C/5) 
which gives in Solidworks equation language: = 5 * int(0.99 + C / 5)

if C=1 --> Result =5
if C=5 --> Result =5
if C=6 --> Result =10
if.....

2 Likes