Class QuadraticFunction

java.lang.Object
velo.ladaalpha.fields.math.QuadraticFunction

public class QuadraticFunction extends Object
The Class QuadraticFunction.
  • Constructor Summary

    Constructors
    Constructor
    Description
    QuadraticFunction(double a, double b, double c)
    Instantiates a new quadratic function.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    compute(double x)
    Compute.
    double
    Gets the a.
    double
    Gets the b.
    double
    Gets the c.
    double[]
    Roots.
    void
    setA(double a)
    Sets the a.
    void
    setB(double b)
    Sets the b.
    void
    setC(double c)
    Sets the c.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • QuadraticFunction

      public QuadraticFunction(double a, double b, double c)
      Instantiates a new quadratic function.
      Parameters:
      a - the a
      b - the b
      c - the c
  • Method Details

    • compute

      public double compute(double x)
      Compute.
      Parameters:
      x - the x
      Returns:
      the double
    • roots

      public double[] roots()
      Roots.
      Returns:
      the double[]
    • getA

      public double getA()
      Gets the a.
      Returns:
      the a
    • setA

      public void setA(double a)
      Sets the a.
      Parameters:
      a - the a to set
    • getB

      public double getB()
      Gets the b.
      Returns:
      the b
    • setB

      public void setB(double b)
      Sets the b.
      Parameters:
      b - the b to set
    • getC

      public double getC()
      Gets the c.
      Returns:
      the c
    • setC

      public void setC(double c)
      Sets the c.
      Parameters:
      c - the c to set