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

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

Introduction

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

Prototype

public double abs() 

Source Link

Document

Return the absolute value of this complex number.

Usage

From source file:com.QMTunnelling.GaussianPotential.java

public double getT() {//returns T coef
    Complex A = this.getA();
    double T = 1 / (A.abs() * A.abs());
    return T;/* ww  w .  ja v a 2 s  . co  m*/
}

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

/**
 * c = abs(a) Michael Borcherds 2009-03-10
 * //from  ww  w.  j a va2s  . com
 * @param a
 *            a
 * @return absolute value of a
 */
final public static double complexAbs(GeoVec2D a) {
    Complex out = new Complex(a.x, a.y);

    return out.abs();
}

From source file:org.renjin.primitives.MathGroup.java

@Deferrable
@Builtin/*w  w  w.  j  a v a 2 s  .c om*/
@DataParallel(value = PreserveAttributeStyle.ALL, passNA = true)
public static double abs(Complex x) {
    return x.abs();
}