diff --git a/Package.swift b/Package.swift index 9830ae2..8fdbaa6 100644 --- a/Package.swift +++ b/Package.swift @@ -5,12 +5,12 @@ import PackageDescription import CoreGraphics let package = Package( - name: "SwiftMathRender", + name: "SwiftMath", products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( - name: "SwiftMathRender", - targets: ["SwiftMathRender"]), + name: "SwiftMath", + targets: ["SwiftMath"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. @@ -20,13 +20,13 @@ let package = Package( // Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( - name: "SwiftMathRender", + name: "SwiftMath", dependencies: [], resources: [ .copy("mathFonts.bundle") ]), .testTarget( - name: "SwiftMathRenderTests", - dependencies: ["SwiftMathRender"]), + name: "SwiftMathTests", + dependencies: ["SwiftMath"]), ] ) diff --git a/Sources/SwiftMathRender/MathRender/MTBezierPath.swift b/Sources/SwiftMath/MathRender/MTBezierPath.swift similarity index 100% rename from Sources/SwiftMathRender/MathRender/MTBezierPath.swift rename to Sources/SwiftMath/MathRender/MTBezierPath.swift diff --git a/Sources/SwiftMathRender/MathRender/MTColor.swift b/Sources/SwiftMath/MathRender/MTColor.swift similarity index 100% rename from Sources/SwiftMathRender/MathRender/MTColor.swift rename to Sources/SwiftMath/MathRender/MTColor.swift diff --git a/Sources/SwiftMathRender/MathRender/MTConfig.swift b/Sources/SwiftMath/MathRender/MTConfig.swift similarity index 100% rename from Sources/SwiftMathRender/MathRender/MTConfig.swift rename to Sources/SwiftMath/MathRender/MTConfig.swift diff --git a/Sources/SwiftMathRender/MathRender/MTFont.swift b/Sources/SwiftMath/MathRender/MTFont.swift similarity index 100% rename from Sources/SwiftMathRender/MathRender/MTFont.swift rename to Sources/SwiftMath/MathRender/MTFont.swift diff --git a/Sources/SwiftMathRender/MathRender/MTFontManager.swift b/Sources/SwiftMath/MathRender/MTFontManager.swift similarity index 100% rename from Sources/SwiftMathRender/MathRender/MTFontManager.swift rename to Sources/SwiftMath/MathRender/MTFontManager.swift diff --git a/Sources/SwiftMathRender/MathRender/MTFontMathTable.swift b/Sources/SwiftMath/MathRender/MTFontMathTable.swift similarity index 100% rename from Sources/SwiftMathRender/MathRender/MTFontMathTable.swift rename to Sources/SwiftMath/MathRender/MTFontMathTable.swift diff --git a/Sources/SwiftMathRender/MathRender/MTLabel.swift b/Sources/SwiftMath/MathRender/MTLabel.swift similarity index 100% rename from Sources/SwiftMathRender/MathRender/MTLabel.swift rename to Sources/SwiftMath/MathRender/MTLabel.swift diff --git a/Sources/SwiftMathRender/MathRender/MTMathAtomFactory.swift b/Sources/SwiftMath/MathRender/MTMathAtomFactory.swift similarity index 100% rename from Sources/SwiftMathRender/MathRender/MTMathAtomFactory.swift rename to Sources/SwiftMath/MathRender/MTMathAtomFactory.swift diff --git a/Sources/SwiftMathRender/MathRender/MTMathList.swift b/Sources/SwiftMath/MathRender/MTMathList.swift similarity index 100% rename from Sources/SwiftMathRender/MathRender/MTMathList.swift rename to Sources/SwiftMath/MathRender/MTMathList.swift diff --git a/Sources/SwiftMathRender/MathRender/MTMathListBuilder.swift b/Sources/SwiftMath/MathRender/MTMathListBuilder.swift similarity index 100% rename from Sources/SwiftMathRender/MathRender/MTMathListBuilder.swift rename to Sources/SwiftMath/MathRender/MTMathListBuilder.swift diff --git a/Sources/SwiftMathRender/MathRender/MTMathListDisplay.swift b/Sources/SwiftMath/MathRender/MTMathListDisplay.swift similarity index 100% rename from Sources/SwiftMathRender/MathRender/MTMathListDisplay.swift rename to Sources/SwiftMath/MathRender/MTMathListDisplay.swift diff --git a/Sources/SwiftMathRender/MathRender/MTMathListIndex.swift b/Sources/SwiftMath/MathRender/MTMathListIndex.swift similarity index 100% rename from Sources/SwiftMathRender/MathRender/MTMathListIndex.swift rename to Sources/SwiftMath/MathRender/MTMathListIndex.swift diff --git a/Sources/SwiftMathRender/MathRender/MTMathUILabel.swift b/Sources/SwiftMath/MathRender/MTMathUILabel.swift similarity index 100% rename from Sources/SwiftMathRender/MathRender/MTMathUILabel.swift rename to Sources/SwiftMath/MathRender/MTMathUILabel.swift diff --git a/Sources/SwiftMathRender/MathRender/MTTypesetter.swift b/Sources/SwiftMath/MathRender/MTTypesetter.swift similarity index 100% rename from Sources/SwiftMathRender/MathRender/MTTypesetter.swift rename to Sources/SwiftMath/MathRender/MTTypesetter.swift diff --git a/Sources/SwiftMathRender/MathRender/MTUnicode.swift b/Sources/SwiftMath/MathRender/MTUnicode.swift similarity index 100% rename from Sources/SwiftMathRender/MathRender/MTUnicode.swift rename to Sources/SwiftMath/MathRender/MTUnicode.swift diff --git a/Sources/SwiftMathRender/mathFonts.bundle/Info.plist b/Sources/SwiftMath/mathFonts.bundle/Info.plist similarity index 100% rename from Sources/SwiftMathRender/mathFonts.bundle/Info.plist rename to Sources/SwiftMath/mathFonts.bundle/Info.plist diff --git a/Sources/SwiftMathRender/mathFonts.bundle/en.lproj/InfoPlist.strings b/Sources/SwiftMath/mathFonts.bundle/en.lproj/InfoPlist.strings similarity index 100% rename from Sources/SwiftMathRender/mathFonts.bundle/en.lproj/InfoPlist.strings rename to Sources/SwiftMath/mathFonts.bundle/en.lproj/InfoPlist.strings diff --git a/Sources/SwiftMathRender/mathFonts.bundle/latinmodern-math.otf b/Sources/SwiftMath/mathFonts.bundle/latinmodern-math.otf similarity index 100% rename from Sources/SwiftMathRender/mathFonts.bundle/latinmodern-math.otf rename to Sources/SwiftMath/mathFonts.bundle/latinmodern-math.otf diff --git a/Sources/SwiftMathRender/mathFonts.bundle/latinmodern-math.plist b/Sources/SwiftMath/mathFonts.bundle/latinmodern-math.plist similarity index 100% rename from Sources/SwiftMathRender/mathFonts.bundle/latinmodern-math.plist rename to Sources/SwiftMath/mathFonts.bundle/latinmodern-math.plist diff --git a/Sources/SwiftMathRender/mathFonts.bundle/texgyretermes-math.otf b/Sources/SwiftMath/mathFonts.bundle/texgyretermes-math.otf similarity index 100% rename from Sources/SwiftMathRender/mathFonts.bundle/texgyretermes-math.otf rename to Sources/SwiftMath/mathFonts.bundle/texgyretermes-math.otf diff --git a/Sources/SwiftMathRender/mathFonts.bundle/texgyretermes-math.plist b/Sources/SwiftMath/mathFonts.bundle/texgyretermes-math.plist similarity index 100% rename from Sources/SwiftMathRender/mathFonts.bundle/texgyretermes-math.plist rename to Sources/SwiftMath/mathFonts.bundle/texgyretermes-math.plist diff --git a/Sources/SwiftMathRender/mathFonts.bundle/xits-math.otf b/Sources/SwiftMath/mathFonts.bundle/xits-math.otf similarity index 100% rename from Sources/SwiftMathRender/mathFonts.bundle/xits-math.otf rename to Sources/SwiftMath/mathFonts.bundle/xits-math.otf diff --git a/Sources/SwiftMathRender/mathFonts.bundle/xits-math.plist b/Sources/SwiftMath/mathFonts.bundle/xits-math.plist similarity index 100% rename from Sources/SwiftMathRender/mathFonts.bundle/xits-math.plist rename to Sources/SwiftMath/mathFonts.bundle/xits-math.plist diff --git a/Tests/SwiftMathRenderTests/MTMathListBuilderTests.swift b/Tests/SwiftMathTests/MTMathListBuilderTests.swift similarity index 99% rename from Tests/SwiftMathRenderTests/MTMathListBuilderTests.swift rename to Tests/SwiftMathTests/MTMathListBuilderTests.swift index 72a4162..44408f0 100644 --- a/Tests/SwiftMathRenderTests/MTMathListBuilderTests.swift +++ b/Tests/SwiftMathTests/MTMathListBuilderTests.swift @@ -1,5 +1,5 @@ import XCTest -@testable import SwiftMathRender +@testable import SwiftMath // // MathRenderSwiftTests.swift diff --git a/Tests/SwiftMathRenderTests/MTMathListTests.swift b/Tests/SwiftMathTests/MTMathListTests.swift similarity index 99% rename from Tests/SwiftMathRenderTests/MTMathListTests.swift rename to Tests/SwiftMathTests/MTMathListTests.swift index ab910e3..be69252 100644 --- a/Tests/SwiftMathRenderTests/MTMathListTests.swift +++ b/Tests/SwiftMathTests/MTMathListTests.swift @@ -1,5 +1,5 @@ import XCTest -@testable import SwiftMathRender +@testable import SwiftMath // // MathRenderSwiftTests.swift diff --git a/Tests/SwiftMathRenderTests/MTTypesetterTests.swift b/Tests/SwiftMathTests/MTTypesetterTests.swift similarity index 99% rename from Tests/SwiftMathRenderTests/MTTypesetterTests.swift rename to Tests/SwiftMathTests/MTTypesetterTests.swift index 5f0304d..d33a22d 100644 --- a/Tests/SwiftMathRenderTests/MTTypesetterTests.swift +++ b/Tests/SwiftMathTests/MTTypesetterTests.swift @@ -1,5 +1,5 @@ import XCTest -@testable import SwiftMathRender +@testable import SwiftMath // // MathTypesetterTests.swift @@ -11,8 +11,7 @@ import XCTest extension CGPoint { func isEqual(to p:CGPoint, accuracy:CGFloat) -> Bool { - let p1 = self - return abs(p1.x - p.x) < accuracy && abs(p1.y - p.y) < accuracy + abs(self.x - p.x) < accuracy && abs(self.y - p.y) < accuracy } }