[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 3/4 = 0 ???
From: |
Marcus G. Daniels |
Subject: |
Re: 3/4 = 0 ??? |
Date: |
21 Jul 1999 12:28:18 -0700 |
User-agent: |
Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4 |
>>>>> "DS" == DARREN MATTHEW SCHREIBER <address@hidden> writes:
DS> Fraction is defined as Others/Neighbors, but if it outputs
DS> others=3 and neighbors=4 then fraction comes out as 0... why?
You need to cast to float before doing the division.
fraction = (float) numOthers / (float) numNeighbors;
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
- Zone usage: alloc: vs. allocBlock:, Ken Cline, 1999/07/20
- Re: Zone usage: alloc: vs. allocBlock:, Marcus G. Daniels, 1999/07/21
- Re: Zone usage: alloc: vs. allocBlock:, Ken Cline, 1999/07/21
- Re: Zone usage: alloc: vs. allocBlock:, Marcus G. Daniels, 1999/07/21
- Re: Zone usage: alloc: vs. allocBlock:, Ken Cline, 1999/07/21
- 3/4 = 0 ???, DARREN MATTHEW SCHREIBER, 1999/07/21
- Re: 3/4 = 0 ???,
Marcus G. Daniels <=
- Re: 3/4 = 0 ???, surak, 1999/07/21
- Re: 3/4 = 0 ???, Rick Riolo, 1999/07/21