Skip to content

Commit

Permalink
Fix drawing bug. Who would have thought that the macOS API uses degre…
Browse files Browse the repository at this point in the history
…es instead of radians?
  • Loading branch information
objecthub committed Nov 26, 2023
1 parent c9d5ca8 commit aaade61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Sources/LispKit/Graphics/Shape.swift
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,9 @@ public enum ShapePrototype {
#elseif os(macOS)
bezierPath.appendArc(withCenter: center,
radius: CGFloat(radius),
startAngle: CGFloat(start),
endAngle: CGFloat(end),
clockwise: clockwise)
startAngle: CGFloat(start * 180 / .pi), // Seriously? In degrees?
endAngle: CGFloat(end * 180 / .pi),
clockwise: !clockwise)
#endif
return bezierPath
case .glyphs(let str, let rect, let font, let flipped):
Expand Down
2 changes: 1 addition & 1 deletion Sources/LispKitRepl/AppInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public struct AppInfo {
public static let buildDate = { () -> String in
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm"
return dateFormatter.string(from: Date(timeIntervalSince1970: 1701005297))
return dateFormatter.string(from: Date(timeIntervalSince1970: 1701012870))
}()
public static let buildAnnotation = " (\(AppInfo.buildDate))"
}

0 comments on commit aaade61

Please sign in to comment.