Skip to content

Commit

Permalink
Remove duplicate calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
sj14 committed Jun 30, 2021
1 parent a608eef commit 2cf2916
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions sun.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,11 @@ func time_of_transit(observer Observer, date time.Time, zenith float64, directio
latitude = -89.8
}

adjustment_for_elevation := 0.0
if observer.Elevation > 0.0 {
adjustment_for_elevation = adjust_to_horizon(observer.Elevation)
}

// TODO:
// if isinstance(observer.elevation, float) && observer.elevation > 0.0 {
// adjustment_for_elevation = adjust_to_horizon(observer.elevation)
if observer.Elevation > 0 {
adjustment_for_elevation := 0.0
if observer.Elevation > 0.0 {
adjustment_for_elevation = adjust_to_horizon(observer.Elevation)
}
// } else if isinstance(observer.elevation, tuple) {
Expand Down

0 comments on commit 2cf2916

Please sign in to comment.