Skip to content

Commit aaade61

Browse files
committed
Fix drawing bug. Who would have thought that the macOS API uses degrees instead of radians?
1 parent c9d5ca8 commit aaade61

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Sources/LispKit/Graphics/Shape.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,9 @@ public enum ShapePrototype {
340340
#elseif os(macOS)
341341
bezierPath.appendArc(withCenter: center,
342342
radius: CGFloat(radius),
343-
startAngle: CGFloat(start),
344-
endAngle: CGFloat(end),
345-
clockwise: clockwise)
343+
startAngle: CGFloat(start * 180 / .pi), // Seriously? In degrees?
344+
endAngle: CGFloat(end * 180 / .pi),
345+
clockwise: !clockwise)
346346
#endif
347347
return bezierPath
348348
case .glyphs(let str, let rect, let font, let flipped):

Sources/LispKitRepl/AppInfo.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public struct AppInfo {
4545
public static let buildDate = { () -> String in
4646
let dateFormatter = DateFormatter()
4747
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm"
48-
return dateFormatter.string(from: Date(timeIntervalSince1970: 1701005297))
48+
return dateFormatter.string(from: Date(timeIntervalSince1970: 1701012870))
4949
}()
5050
public static let buildAnnotation = " (\(AppInfo.buildDate))"
5151
}

0 commit comments

Comments
 (0)