module SQLite3ExtendFunction::Functions::Sin

SQLite3ExtendFunction::Functions::Sin

Public Class Methods

call(x) click to toggle source

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

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