Thanks for the code. After replacing the GreatCircle.x calls with some expression, the function compiles on 5.1.1, 5.2.0 and the current HEAD developing towards 5.3.0.
Note that the error messages as you have posted them do not incriminate "double" as the faulty type name (as the compiler does when you use e.g. double2 instead). -W On 15 August 2011 09:51, ru <[email protected]> wrote: > 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. > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users >
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
