From 84e220b332bfffb0f2dcc39b9697a6fd6691d265 Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Mon, 25 Apr 2022 18:36:30 +0200 Subject: Initial commit --- src/function/Sin.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 src/function/Sin.java (limited to 'src/function/Sin.java') diff --git a/src/function/Sin.java b/src/function/Sin.java new file mode 100755 index 0000000..83bbb6b --- /dev/null +++ b/src/function/Sin.java @@ -0,0 +1,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; + } + +} -- cgit v1.2.1