[Groonga-commit] groonga/groonga [master] test: use the value of milliseconds expression for converting to radian

Back to archive index

null+****@clear***** null+****@clear*****
2012年 5月 21日 (月) 19:57:12 JST


HAYASHI Kentaro	2012-05-21 19:57:12 +0900 (Mon, 21 May 2012)

  New Revision: 2d0b9177cdd66e709d7cb8567e8ea2b54d5481b3

  Log:
    test: use the value of milliseconds expression for converting to radian

  Modified files:
    test/function/tools/geo/generate-grntest-data.rb

  Modified: test/function/tools/geo/generate-grntest-data.rb (+4 -4)
===================================================================
--- test/function/tools/geo/generate-grntest-data.rb    2012-05-21 19:53:52 +0900 (b38dc7f)
+++ test/function/tools/geo/generate-grntest-data.rb    2012-05-21 19:57:12 +0900 (436b27a)
@@ -424,10 +424,10 @@ class GrnTestData
   def geo_distance(app_type)
     case app_type
     when "", "rect", "rectangle"
-      lat1 = geo_int2rad(@latitude_start_degree)
-      lng1 = geo_int2rad(@longitude_start_degree)
-      lat2 = geo_int2rad(@latitude_end_degree)
-      lng2 = geo_int2rad(@longitude_end_degree)
+      lat1 = geo_int2rad(@latitude_start.to_i)
+      lng1 = geo_int2rad(@longitude_start.to_i)
+      lat2 = geo_int2rad(@latitude_end.to_i)
+      lng2 = geo_int2rad(@longitude_end.to_i)
       x = (lng2 - lng1) * Math.cos((lat1 + lat2) * 0.5)
       y = (lat2 - lat1)
       return (Math.sqrt((x * x) + (y * y)) * GRN_GEO_RADIUS).floor




Groonga-commit メーリングリストの案内
Back to archive index