Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * This class represents a <a href="https://en.wikipedia.org/wiki/Logistic_function">logistic growth curve</a>, for use in physics calculations where a value chages logarithmically over time.
- */
- public class LogisticGrowthCurve {
- private final double capacity, a, b;
- public LogisticGrowthCurve(double capacity, double a, double b) {
- this.capacity = capacity;
- this.a = a;
- this.b = b;
- }
- public double get(double x) {
- return capacity / (1 + Math.exp(a + (b * x)));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment