module SQLite3ExtendFunction::Functions::Degrees
Public Class Methods
call(dp)
click to toggle source
@param [Integer, Float] dp @return [Float] @raise [SQLite3::SQLException]
# File lib/sqlite3_extend_function/functions/degrees.rb, line 11 def call(dp) Float(dp) * 180 / Math::PI unless dp.nil? rescue ArgumentError raise SQLite3::SQLException, "invalid input syntax for type double precision: \"#{dp}\"" end