Re: weird problem visual c++
From: CBFalconer (cbfalconer_at_yahoo.com)
Date: 03/08/04
- Next message: Mathieu Fregeau: "problem with calloc"
- Previous message: CBFalconer: "Re: Algorithm wanted"
- In reply to: Kurt Van Samang: "Re: weird problem visual c++"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 08 Mar 2004 00:48:32 GMT
Kurt Van Samang wrote:
>
> you were right, the problem was some floating point round off
> which made the value 39.9995 or something, so i added a small
> value to solve this. thx
Please don't toppost. Don't add a small number, you will just
move the error point. Decide how many digits you want, arrange
for that to be the integral part of the float, and add 0.5 before
truncating with a cast or integer assignment.
-- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net> USE worldnet address!
- Next message: Mathieu Fregeau: "problem with calloc"
- Previous message: CBFalconer: "Re: Algorithm wanted"
- In reply to: Kurt Van Samang: "Re: weird problem visual c++"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|