sascha@2281: package de.intevation.flys.artifacts.math;
sascha@2281: 
sascha@3076: public class LinearFunction
sascha@2281: implements   Function
sascha@2281: {
sascha@2281:     protected double m;
sascha@2281:     protected double b;
sascha@2281: 
sascha@2281:     public LinearFunction(double m, double b) {
sascha@2281:         this.m = m;
sascha@2281:         this.b = b;
sascha@2281:     }
sascha@2281: 
sascha@2281:     @Override
sascha@2281:     public double value(double x) {
sascha@2281:         return x*m + b;
sascha@2281:     }
sascha@2281: }
sascha@2281: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :