PHP to Ruby
Convert PHP code into Ruby!
-
cos
Posted on March 14th, 2009 No commentsReturns the cosine of the argument provided in radians.
PHP
echo cos(0.5); // => 0.87758256189037;
Ruby
puts Math.cos(0.5); # => 0.877582561890373;
-
ceil
Posted on March 11th, 2009 No commentsReturns the next highest integer value by rounding up the argument provided.
PHP
echo ceil(4.1); // => 5
Ruby
puts 4.1.ceil; # => 5


