Round within a function

S

sam

I have a function where I need to round the result of a
calculation before it is used again within the same
function

public function dividend(a as double, b as double, c as
double, d as double, e as double) as double

etc. etc.
The figures and how it works are something like:

A=3.1713
b=4.5938
c=a*b
i.e c=14.56831794

before I use c in the next part of the calculation I need
to round it to be 14.57

d=e*c

This is all within the one function and it is important
that the rounding is done at this stage.

Is there anything i can use to acheive this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top