[rules-users] Functions with array parameters (double[]) cease to compile in 5.2.0

ru sorokin at oogis.ru
Mon Aug 15 03:51:55 EDT 2011


function ArrayList nextPoint( int N, int t1, int sec, double[] a, double v )
{ int Nxt = N+1;
int Nxt2 = Nxt * 2;
if(Nxt2 >= a.length-1)
    return null;
int N2 = N * 2;
double p1 = a[N2];
double l1 = a[N2+1];
double p2 = a[Nxt2];
double l2 = a[Nxt2+1];
double D = GreatCircle.sphericalDistance(p1, l1, p2, l2);
int dt = sec - t1;
double ds = dt * v;
if(ds > D){
    int t2 = (int) (t1 + D / v);
    return nextPoint(Nxt, t2, sec, a, v);
} else {
    double az = GreatCircle.sphericalAzimuth(p1, l1, p2, l2);
    double[] sb = GreatCircle.sphericalBetween(p1, l1, ds, az, 1);
    ArrayList al = new ArrayList();
    al.add(N);
    al.add(t1);
    al.add(new double[]{sb[2], sb[3]});
    al.add(az);
    return al;
} }


--
View this message in context: http://drools.46999.n3.nabble.com/Functions-with-array-parameters-double-cease-to-compile-in-5-2-0-tp3251260p3255191.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list