List of usage examples for org.apache.commons.math.complex Complex getImaginary
public double getImaginary()
From source file:BackEnd.FazorVektor.java
public double getComplex_rms_ABS() { double Real = Math.sqrt( Math.pow(this.X.getReal(), 2) + Math.pow(this.Y.getReal(), 2) + Math.pow(this.Z.getReal(), 2)); double Image = Math.sqrt(Math.pow(this.X.getImaginary(), 2) + Math.pow(this.Y.getImaginary(), 2) + Math.pow(this.Z.getImaginary(), 2)); Complex cislo = new Complex(Real, Image); return Math.sqrt(Math.pow(cislo.getReal(), 2) + Math.pow(cislo.getImaginary(), 2)); }
From source file:com.opengamma.analytics.math.util.wrapper.CommonsMathWrapperTest.java
@Test public void testComplexNumber() { final Complex commons = CommonsMathWrapper.wrap(OG_COMPLEX); assertEquals(commons.getReal(), OG_COMPLEX.getReal(), 0); assertEquals(commons.getImaginary(), OG_COMPLEX.getImaginary(), 0); }
From source file:geogebra.common.kernel.geos.GeoVec2D.java
/** * c = sin(a) /*from ww w . ja v a2s . c o m*/ * * @param a * a * @param c * c */ final public static void complexSin(GeoVec2D a, GeoVec2D c) { Complex out = new Complex(a.x, a.y); out = out.sin(); c.x = out.getReal(); c.y = out.getImaginary(); c.setMode(Kernel.COORD_COMPLEX); }
From source file:geogebra.common.kernel.geos.GeoVec2D.java
/** * c = cos(a) //from w w w . j a v a 2 s .co m * * @param a * a * @param c * c */ final public static void complexCos(GeoVec2D a, GeoVec2D c) { Complex out = new Complex(a.x, a.y); out = out.cos(); c.x = out.getReal(); c.y = out.getImaginary(); c.setMode(Kernel.COORD_COMPLEX); }
From source file:geogebra.common.kernel.geos.GeoVec2D.java
/** * c = tan(a) // ww w. j a va 2 s. c om * * @param a * a * @param c * c */ final public static void complexTan(GeoVec2D a, GeoVec2D c) { Complex out = new Complex(a.x, a.y); out = out.tan(); c.x = out.getReal(); c.y = out.getImaginary(); c.setMode(Kernel.COORD_COMPLEX); }
From source file:geogebra.common.kernel.geos.GeoVec2D.java
/** * c = e ^ a Michael Borcherds 2009-03-10 * // w w w. j av a 2s . c o m * @param a * power * @param c * result */ final public static void complexExp(GeoVec2D a, GeoVec2D c) { Complex out = new Complex(a.x, a.y); out = out.exp(); c.x = out.getReal(); c.y = out.getImaginary(); c.setMode(Kernel.COORD_COMPLEX); }
From source file:geogebra.common.kernel.geos.GeoVec2D.java
/** * c = natural log(a) Michael Borcherds 2009-03-10 * /* www .j av a 2 s . c o m*/ * @param a * a * @param c * logaritmus of a */ final public static void complexLog(GeoVec2D a, GeoVec2D c) { Complex out = new Complex(a.x, a.y); out = out.log(); c.x = out.getReal(); c.y = out.getImaginary(); c.setMode(Kernel.COORD_COMPLEX); }
From source file:geogebra.common.kernel.geos.GeoVec2D.java
/** * c = sqrt(a) Michael Borcherds 2010-02-07 * /*from w ww . j a v a 2 s. c om*/ * @param a * a * @param c * c */ final public static void complexSqrt(GeoVec2D a, GeoVec2D c) { Complex out = new Complex(a.x, a.y); out = out.sqrt(); c.x = out.getReal(); c.y = out.getImaginary(); c.setMode(Kernel.COORD_COMPLEX); }
From source file:geogebra.common.kernel.geos.GeoVec2D.java
/** * c = sinh(a) //w w w .ja va2s.c o m * * @param a * a * @param c * c */ final public static void complexSinh(GeoVec2D a, GeoVec2D c) { Complex out = new Complex(a.x, a.y); out = out.sinh(); c.x = out.getReal(); c.y = out.getImaginary(); c.setMode(Kernel.COORD_COMPLEX); }
From source file:geogebra.common.kernel.geos.GeoVec2D.java
/** * c = cosh(a) //from www . j a v a 2 s . com * * @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); }