module SQLite3ExtendFunction::Functions::Cot

SQLite3ExtendFunction::Functions::Cot

Public Class Methods

call(x) click to toggle source

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

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