@LATTICE("B<T")
-@METHODDEFAULT("OUT<IN,THISLOC=IN")
+@METHODDEFAULT("OUT<IN,OUT<THIS,,IN*,THISLOC=THIS,RETURNLOC=OUT")
public class Math {
@LOC("T")
static final double PI = 3.14159265358979323846;
return PI;
}
- public static int abs(int x) {
+ public static int abs(@LOC("IN") int x) {
return (x < 0) ? -x : x;
}
return (x < 0) ? -x : x;
}
- public static float abs(float x) {
+ public static float abs(@LOC("IN") float x) {
return (x < 0) ? -x : x;
}
return (a > b) ? a : b;
}
- public static float max(float a, float b) {
+ public static float max(@LOC("IN") float a, @LOC("IN") float b) {
return (a > b) ? a : b;
}
- public static int max(int a, int b) {
+ public static int max(@LOC("IN") int a, @LOC("IN") int b) {
return (a > b) ? a : b;
}
return (a < b) ? a : b;
}
- @RETURNLOC("IN")
+ @RETURNLOC("OUT")
+ @PCLOC("IN")
public static int min(@LOC("IN") int a, @LOC("IN") int b) {
return (a < b) ? a : b;
}
return r;
}
- public static int round(float a) {
+ public static int round(@LOC("IN") float a) {
// this check for NaN, from JLS 15.21.1, saves a method call
return (int) floor(a + 0.5f);
}