Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mamantoha committed Apr 12, 2024
1 parent bccffb3 commit 6eef873
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class GeoLocation
property name : String
property longitude : Float64
property latitude : Float64
getter size = 2 # Assuming all GeoLocation objects are 2-dimensional
def initialize(@name : String, @longitude : Float64, @latitude : Float64)
end
Expand All @@ -86,11 +87,6 @@ class GeoLocation
else raise "Index out of bounds"
end
end
# Assuming all GeoLocation objects are 2-dimensional
def size
2
end
end
# Create an array of GeoLocation points
Expand Down
6 changes: 1 addition & 5 deletions samples/geo_location.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class GeoLocation
property name : String
property longitude : Float64
property latitude : Float64
getter size = 2 # Assuming all GeoLocation objects are 2-dimensional

def initialize(@name : String, @longitude : Float64, @latitude : Float64)
end
Expand All @@ -16,11 +17,6 @@ class GeoLocation
else raise "Index out of bounds"
end
end

# Assuming all GeoLocation objects are 2-dimensional
def size
2
end
end

# Example Usage:
Expand Down
6 changes: 1 addition & 5 deletions samples/haversine_distance.cr
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class GeoLocation
property name : String
property longitude : Float64
property latitude : Float64
getter size = 2 # Assuming all GeoLocation objects are 2-dimensional

def initialize(@name : String, @longitude : Float64, @latitude : Float64)
end
Expand All @@ -17,11 +18,6 @@ class GeoLocation
else raise "Index out of bounds"
end
end

# Assuming all GeoLocation objects are 2-dimensional
def size
2
end
end

module Kd
Expand Down

0 comments on commit 6eef873

Please sign in to comment.