Skip to content

Instantly share code, notes, and snippets.

@naoty
naoty / position.rb
Last active November 29, 2021 05:26
ある緯度経度で指定された地点からある距離と方向に移動した後の緯度経度を計算する
here = Position.new(lat_A, lng_B)
# 90度方向に100m移動したあとの地点
there = here.move(distance: 100, heading: 90)