private Round resolveRound ( FunctionRef fun ) { if ( fun . getOperand ( ) . isEmpty ( ) || fun . getOperand ( ) . size ( ) > 2 ) { throw new IllegalArgumentException ( "Could not resolve call to system operator Round. Expected 1 or 2 arguments." ) ; } final Round round = of . createRound ( ) . withOperand ( fun . getOperand ( ) . get ( 0 ) ) ; if ( fun . getOperand ( ) . size ( ) == 2 ) { round . setPrecision ( fun . getOperand ( ) . get ( 1 ) ) ; } builder . resolveCall ( "System" , "Round" , new RoundInvocation ( round ) ) ; return round ; }
Arithmetic Function Support