summaryrefslogtreecommitdiff
path: root/src/function/Sin.java
blob: 83bbb6beb30c8fdd0c378860d8e1b04b744208fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package function;

public class Sin extends Function {
	
	private double a, b, c, d;
	
	public Sin(double a, double b, double c, double d) {
		this.a = a;
		this.b = b;
		this.c = c;
		this.d = d;
	}

	@Override
	public double getY(double x) {
		return a*Math.sin(b*(x+c))+d;
	}

}