00001 package com.graphbuilder.math.func; 00002 00008 public class PowFunction implements Function { 00009 00010 public PowFunction() {} 00011 00016 public double of(double[] d, int numParam) { 00017 return java.lang.Math.pow(d[0], d[1]); 00018 } 00019 00023 public boolean acceptNumParam(int numParam) { 00024 return numParam == 2; 00025 } 00026 00027 public String toString() { 00028 return "pow(base, exponent)"; 00029 } 00030 }