return b == median(a - eps, b, c + eps);
}
+float ExponentialFalloff(float mindist, float maxdist, float halflifedist, float d)
+{
+ if (halflifedist > 0) return pow(0.5, (bound(mindist, d, maxdist) - mindist) / halflifedist);
+ else if (halflifedist < 0) return pow(0.5, (bound(mindist, d, maxdist) - maxdist) / halflifedist);
+ else return 1;
+}
+
float power2of(float e)
{
return pow(2, e);