Lines Matching defs:rhs

140      * If either this or <code>rhs</code> has a NaN value in either part,
145 * @param rhs the other complex number
147 * @throws NullPointerException if <code>rhs</code> is null
149 public Complex add(Complex rhs) {
150 return createComplex(real + rhs.getReal(),
151 imaginary + rhs.getImaginary());
192 * <li>If either this or <code>rhs</code> has a NaN value in either part,
194 * <li>If <code>rhs</code> equals {@link #ZERO}, {@link #NaN} is returned.
196 * <li>If this and <code>rhs</code> are both infinite,
199 * <code>rhs</code> is infinite (one or both parts infinite),
201 * <li>If this is infinite and <code>rhs</code> is finite, NaN values are
206 * @param rhs the other complex number
208 * @throws NullPointerException if <code>rhs</code> is null
210 public Complex divide(Complex rhs) {
211 if (isNaN() || rhs.isNaN()) {
215 double c = rhs.getReal();
216 double d = rhs.getImaginary();
221 if (rhs.isInfinite() && !isInfinite()) {
262 Complex rhs = (Complex)other;
263 if (rhs.isNaN()) {
266 return (real == rhs.real) && (imaginary == rhs.imaginary);
340 * Returns {@link #NaN} if either this or <code>rhs</code> has one or more
343 * Returns {@link #INF} if neither this nor <code>rhs</code> has one or more
344 * NaN parts and if either this or <code>rhs</code> has one or more
353 * @param rhs the other complex number
355 * @throws NullPointerException if <code>rhs</code> is null
357 public Complex multiply(Complex rhs) {
358 if (isNaN() || rhs.isNaN()) {
362 Double.isInfinite(rhs.real)|| Double.isInfinite(rhs.imaginary)) {
366 return createComplex(real * rhs.real - imaginary * rhs.imaginary,
367 real * rhs.imaginary + imaginary * rhs.real);
380 * Returns {@link #NaN} if either this or <code>rhs</code> has one or more
383 * Returns {@link #INF} if neither this nor <code>rhs</code> has one or more
384 * NaN parts and if either this or <code>rhs</code> has one or more
393 * @param rhs the scalar number
396 public Complex multiply(double rhs) {
397 if (isNaN() || Double.isNaN(rhs)) {
401 Double.isInfinite(rhs)) {
405 return createComplex(real * rhs, imaginary * rhs);
433 * If either this or <code>rhs</code> has a NaN value in either part,
438 * @param rhs the other complex number
440 * @throws NullPointerException if <code>rhs</code> is null
442 public Complex subtract(Complex rhs) {
443 if (isNaN() || rhs.isNaN()) {
447 return createComplex(real - rhs.getReal(),
448 imaginary - rhs.getImaginary());