summaryrefslogtreecommitdiff
path: root/src/primitives.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/primitives.cc')
-rw-r--r--src/primitives.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/primitives.cc b/src/primitives.cc
index 9b755ef..89c1573 100644
--- a/src/primitives.cc
+++ b/src/primitives.cc
@@ -242,9 +242,8 @@ AbstractNode *PrimitiveModule::instantiate(const Context *ctx, const ModuleInsta
*/
int get_fragments_from_r(double r, double fn, double fs, double fa)
{
- if (r < GRID_FINE) return 0;
- if (fn > 0.0)
- return (int)fn;
+ if (r < GRID_FINE) return 3;
+ if (fn > 0.0) return (int)(fn >= 3 ? fn : 3);
return (int)ceil(fmax(fmin(360.0 / fa, r*2*M_PI / fs), 5));
}
contact: Jan Huwald // Impressum