Skip to content

Commit

Permalink
Fix crash in geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
muukii committed Mar 5, 2022
1 parent 4279ef0 commit 354f5e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/BrightroomEngine/Library/Geometry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public struct PixelAspectRatio: Hashable {
public func _minimized() -> Self {
func gcd(_ a: CGFloat, _ b: CGFloat) -> CGFloat {
let r = a.truncatingRemainder(dividingBy: b)
if r != 0 {
if r != 0, r != .nan {
return gcd(b, r)
} else {
return b
Expand Down

0 comments on commit 354f5e7

Please sign in to comment.