Skip to content

Commit

Permalink
Implement nqp::abs_i.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Aug 21, 2014
1 parent a241203 commit 085443a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/vm/js/QAST/Compiler.nqp
Expand Up @@ -411,6 +411,7 @@ class QAST::OperationsJS {
add_simple_op($func ~ '_n', $T_NUM, [$T_NUM], sub ($arg) {"Math.$func($arg)"});
}

add_simple_op('abs_i', $T_INT, [$T_INT], sub ($arg) {"Math.abs($arg)"});
add_simple_op('pow_n', $T_NUM, [$T_NUM, $T_NUM], sub ($base, $exponent) {"Math.pow($base, $exponent)"});

for <if unless> -> $op_name {
Expand Down

0 comments on commit 085443a

Please sign in to comment.