module SQLite3ExtendFunction::Functions::Atan

SQLite3ExtendFunction::Functions::Atan

Public Class Methods

call(x) click to toggle source

@param [Integer, Float] x @return [Float] @raise [SQLite3::SQLException]

# File lib/sqlite3_extend_function/functions/atan.rb, line 11
def call(x)
  Math.atan(Float(x))
rescue ArgumentError
  raise SQLite3::SQLException, "invalid input syntax for type double precision: #{x}"
end