Java Number Power Pow(double val, Object in)

Here you can find the source of Pow(double val, Object in)

Description

Pow

License

Open Source License

Declaration

public static final void Pow(double val, Object in) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static final void Pow(double val, Object in) {
        if (in == null)
            return;
        if (in instanceof double[]) {
            double[] inn = (double[]) in;
            for (int i = 0, s = inn.length; i < s; i++)
                inn[i] = Math.pow(val, inn[i]);
        } else {//from   w w  w  .j a  va2 s.c om
            for (int i = 0, s = ((Object[]) in).length; i < s; i++)
                Pow(((Object[]) in)[i], val);
        }
    }

    public static final void Pow(Object in, double val) {
        if (in == null)
            return;
        if (in instanceof double[]) {
            double[] inn = (double[]) in;
            for (int i = 0, s = inn.length; i < s; i++)
                inn[i] = Math.pow(inn[i], val);
        } else {
            for (int i = 0, s = ((Object[]) in).length; i < s; i++)
                Pow(((Object[]) in)[i], val);
        }
    }
}

Related

  1. pow(double base, double exp)
  2. pow(double base, int exp)
  3. pow(double base, int exp)
  4. pow(double base, int exponent)
  5. pow(double number)
  6. Pow(double value)
  7. pow(double value)
  8. pow(double x, double y)
  9. pow(double x, double y)