diff options
author | Thomas White <taw@physics.org> | 2014-11-14 15:48:19 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-11-14 15:48:19 +0100 |
commit | 292a614efb15d3608bee9a7199bd867c9f91c808 (patch) | |
tree | db2eee51600ee4fa5213d05418c6726e2a43e2b3 /src | |
parent | e0a717ebe6981cd14f268056bdcdc7ba53dfe029 (diff) |
Keep everything in SI base units internally
Diffstat (limited to 'src')
-rw-r--r-- | src/pattern_sim.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pattern_sim.c b/src/pattern_sim.c index fe30ae4c..bd0e6615 100644 --- a/src/pattern_sim.c +++ b/src/pattern_sim.c @@ -210,12 +210,12 @@ static struct quaternion read_quaternion() } -static int random_ncells(double len, double min_nm, double max_nm) +static int random_ncells(double len, double min_m, double max_m) { int min_cells, max_cells, wid; - min_cells = min_nm*1e-9 / len; - max_cells = max_nm*1e-9 / len; + min_cells = min_m / len; + max_cells = max_m / len; wid = max_cells - min_cells; return wid*random()/RAND_MAX + min_cells; @@ -391,6 +391,7 @@ int main(int argc, char *argv[]) ERROR("Invalid minimum size.\n"); return 1; } + min_size /= 1e9; random_size++; break; @@ -400,6 +401,7 @@ int main(int argc, char *argv[]) ERROR("Invalid maximum size.\n"); return 1; } + max_size /= 1e9; random_size++; break; |