Skip to content

Commit

Permalink
fix(Division by Zero): #320 - guard division by 0
Browse files Browse the repository at this point in the history
  • Loading branch information
robertodias180 committed Dec 28, 2020
1 parent 2bff39f commit a5db589
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Source/Infra/EKContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ extension EKContentView {
}

private func calculateLogarithmicOffset(forOffset offset: CGFloat, currentTranslation: CGFloat) {
guard verticalLimit != 0 else { return }
if attributes.position.isTop {
inConstraint.constant = verticalLimit * (1 + log10(offset / verticalLimit))
} else {
Expand Down

0 comments on commit a5db589

Please sign in to comment.