public static Object[] polar2CartesianArray(Double r,Double alpha){
  double x=r.doubleValue() * Math.cos(alpha.doubleValue());
  double y=r.doubleValue() * Math.sin(alpha.doubleValue());
  return new Object[]{new Double(x),new Double(y)};
}

public static Object [ ] polar2CartesianArray ( Double r , Double alpha ) { double x = r . doubleValue ( ) * Math . cos ( alpha . doubleValue ( ) ) ; double y = r . doubleValue ( ) * Math . sin ( alpha . doubleValue ( ) ) ; return new Object [ ] { new Double ( x ) , new Double ( y ) } ; }
convert polar coordinates to cartesian coordinates . the function may be called twice , once to retrieve the result columns ( with null parameters ) , and the second time to return the data .
