Telegram-iOS/third-party/Swift2D/Sources/Point+CoreGraphics.swift
2026-04-24 23:19:15 +04:00

19 lines
421 B
Swift

#if canImport(CoreGraphics)
import CoreGraphics
#else
import Foundation
#endif
public extension Point {
/// Initialize a `Point` using the provided `CGPoint` values.
init(_ point: CGPoint) {
self.init(x: point.x, y: point.y)
}
}
public extension CGPoint {
/// Initialize a `CPPoint` using the provided `Point` values.
init(_ point: Point) {
self.init(x: point.x, y: point.y)
}
}