Example usage for org.apache.commons.math.complex Complex cosh

List of usage examples for org.apache.commons.math.complex Complex cosh

Introduction

In this page you can find the example usage for org.apache.commons.math.complex Complex cosh.

Prototype

public Complex cosh() 

Source Link

Document

Compute the <a href="http://mathworld.wolfram.com/HyperbolicCosine.html" TARGET="_top"> hyperbolic cosine</a> of this complex number.

Usage

From source file:geogebra.common.kernel.geos.GeoVec2D.java

/**
 * c = cosh(a) /*  w w  w  .j a v a2 s.  c om*/
 * 
 * @param a
 *            a
 * @param c
 *            c
 */
final public static void complexCosh(GeoVec2D a, GeoVec2D c) {
    Complex out = new Complex(a.x, a.y);
    out = out.cosh();
    c.x = out.getReal();
    c.y = out.getImaginary();
    c.setMode(Kernel.COORD_COMPLEX);
}

From source file:geogebra.common.kernel.geos.GeoVec2D.java

/**
 * c = sech(a) //from  w w  w . j  av  a  2s  . c om
 * 
 * @param a
 *            a
 * @param c
 *            c
 */
final public static void complexSech(GeoVec2D a, GeoVec2D c) {
    Complex out = new Complex(a.x, a.y);
    out = Complex.ONE.divide(out.cosh());

    c.x = out.getReal();
    c.y = out.getImaginary();
    c.setMode(Kernel.COORD_COMPLEX);
}