src/test/01-Basic/251-min-max.ck
raw| 1 | // different overloading |
| 2 | |
| 3 | // should use min(int,int) |
| 4 | <<< Math.min( 1, 2 ) >>>; |
| 5 | // should use min(float, float) if at least one is float |
| 6 | <<< Math.min( 3.0, 4.0 ) >>>; |
| 7 | <<< Math.min( 5.0, 6 ) >>>; |
| 8 | <<< Math.min( 7, 8.0 ) >>>; |
| 9 | |
| 10 | // should use max(int,int) |
| 11 | <<< Math.max( 1, 2 ) >>>; |
| 12 | // should use max(float, float) if at least one is float |
| 13 | <<< Math.max( 3.0, 4.0 ) >>>; |
| 14 | <<< Math.max( 5.0, 6 ) >>>; |
| 15 | <<< Math.max( 7, 8.0 ) >>>; |