Sha256: 1274b03fd75aa79e31e410ab6e22987ff33587e80f60bacf4ae2777d2eeea01d

Contents?: true

Size: 373 Bytes

Versions: 15

Compression:

Stored size: 373 Bytes

Contents

# frozen_string_literal: true

class Float
  # Converts a packed DMS value (DDDMMMSSS.SS) into decimal degrees.
  #
  # @return [Float]
  def to_decimal_degrees
    FFI::GDAL::GDAL.GDALPackedDMSToDec(self)
  end

  # Converts decimal degrees int a packed DMS value (DDDMMMSSS.SS).
  #
  # @return [Float]
  def to_dms
    FFI::GDAL::GDAL.GDALDecToPackedDMS(self)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ffi-gdal-1.1.0 lib/ext/float_ext.rb
ffi-gdal-1.0.4 lib/ext/float_ext.rb
ffi-gdal-1.0.3 lib/ext/float_ext.rb
ffi-gdal-1.0.2 lib/ext/float_ext.rb
ffi-gdal-1.0.1 lib/ext/float_ext.rb
ffi-gdal-1.0.0 lib/ext/float_ext.rb
ffi-gdal-1.0.0.beta16 lib/ext/float_ext.rb
ffi-gdal-1.0.0.beta15 lib/ext/float_ext.rb
ffi-gdal-1.0.0.beta14 lib/ext/float_ext.rb
ffi-gdal-1.0.0.beta13 lib/ext/float_ext.rb
ffi-gdal-1.0.0.beta12 lib/ext/float_ext.rb
ffi-gdal-1.0.0.beta11 lib/ext/float_ext.rb
ffi-gdal-1.0.0.beta10 lib/ext/float_ext.rb
ffi-gdal-1.0.0.beta9 lib/ext/float_ext.rb
ffi-gdal-1.0.0.beta8 lib/ext/float_ext.rb