Skip to content

Commit

Permalink
add Math.log
Browse files Browse the repository at this point in the history
  • Loading branch information
charliesome committed Feb 5, 2012
1 parent f1eb85a commit 6934c56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/twostroke/runtime/lib/math.rb
Expand Up @@ -47,7 +47,7 @@ module Twostroke::Runtime
}, nil, "parseFloat", [])

# one argument functions
%w(sqrt sin cos tan exp).each do |method|
%w(sqrt sin cos tan exp log).each do |method|
obj.proto_put method, Types::Function.new(->(scope, this, args) {
ans = begin
Math.send method, Types.to_number(args[0] || Types::Undefined.new).number
Expand Down

0 comments on commit 6934c56

Please sign in to comment.