Re: Rounding Negative Number Toward Zero
- From: "Larry Serflaten" <serflaten@xxxxxxxxxxxxxx>
- Date: Mon, 9 May 2005 16:19:08 -0500
"Jack" <Jack@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
>
> So, what I decided to do is create a condition in my procedure and force the
> value being passed in down to an appropriate number so it'll round the way I
> want. Here is my code:
Another way to skin that cat:
Function RoundOff(ByVal Value As Double) As Double
RoundOff = Int(Value * 100 + 0.5) / 100 * Sgn(Value)
End Function
LFS
.
- References:
- Rounding Negative Number Toward Zero
- From: Jack
- Re: Rounding Negative Number Toward Zero
- From: Mike D Sutton
- Re: Rounding Negative Number Toward Zero
- From: Jack
- Rounding Negative Number Toward Zero
- Prev by Date: Re: Lines in a text file
- Next by Date: Question for Karl Peterson
- Previous by thread: Re: Rounding Negative Number Toward Zero
- Next by thread: Use ActiveX DLL in VB.net
- Index(es):
Relevant Pages
|