mirror of
https://github.com/zhigang1992/PerspectiveTransform.git
synced 2026-04-27 19:15:49 +08:00
reindent
This commit is contained in:
@@ -26,7 +26,7 @@ class CompareTransformSpecConfiguration: QuickConfiguration {
|
||||
CGPoint(x: 377.282671, y: 41.4352201),
|
||||
CGPoint(x: 193.321418, y: 330.023027),
|
||||
CGPoint(x: 459.781253, y: 251.836131)
|
||||
]
|
||||
]
|
||||
let frame = CGRect(origin: CGPoint.zero,
|
||||
size: CGSize(width: 20, height: 10))
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ class PerspectiveSpec: QuickSpec {
|
||||
it("should list all vectors") {
|
||||
let perspective = Perspective(CGRect.zero)
|
||||
expect(String(describing: perspective)) == "Perspective: [\n"
|
||||
+ "double3(0.0, 0.0, 1.0)\n"
|
||||
+ "double3(0.0, 0.0, 1.0)\n"
|
||||
+ "double3(0.0, 0.0, 1.0)\n"
|
||||
+ "double3(0.0, 0.0, 1.0)\n"
|
||||
+ "]"
|
||||
+ "double3(0.0, 0.0, 1.0)\n"
|
||||
+ "double3(0.0, 0.0, 1.0)\n"
|
||||
+ "double3(0.0, 0.0, 1.0)\n"
|
||||
+ "double3(0.0, 0.0, 1.0)\n"
|
||||
+ "]"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,8 +52,8 @@ class PerspectiveSpec: QuickSpec {
|
||||
|
||||
it("should be homegenious vector to corners") {
|
||||
expect(perspective.basisVectorsToPointsMap) == Matrix3x3(Vector3(0.0, 0.0, -1.0),
|
||||
Vector3(10.0, 0.0, 1.0),
|
||||
Vector3(0.0, 20.0, 1.0))
|
||||
Vector3(10.0, 0.0, 1.0),
|
||||
Vector3(0.0, 20.0, 1.0))
|
||||
}
|
||||
|
||||
context("pointsToBasisVectorsMap") {
|
||||
|
||||
@@ -123,8 +123,8 @@ class ProjectionSpec: QuickSpec {
|
||||
|
||||
context("scale and translate") {
|
||||
let expected = Matrix3x3([200.0/152, 0, 100,
|
||||
0, 200.0/122, 100,
|
||||
0, 0, 1])
|
||||
0, 200.0/122, 100,
|
||||
0, 0, 1])
|
||||
var start: Perspective!
|
||||
var destination: Perspective!
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class CompareTransformSpecConfiguration: QuickConfiguration {
|
||||
CGPoint(x: 377.282671, y: 41.4352201),
|
||||
CGPoint(x: 193.321418, y: 330.023027),
|
||||
CGPoint(x: 459.781253, y: 251.836131)
|
||||
]
|
||||
]
|
||||
let frame = CGRect(origin: CGPoint.zero,
|
||||
size: CGSize(width: 20, height: 10))
|
||||
beforeEach {
|
||||
|
||||
@@ -28,7 +28,7 @@ class PerformanceTest: XCTestCase {
|
||||
CGPoint(x: 377.282671, y: 41.4352201),
|
||||
CGPoint(x: 193.321418, y: 330.023027),
|
||||
CGPoint(x: 459.781253, y: 251.836131)
|
||||
]
|
||||
]
|
||||
|
||||
let destination = QuadrilateralCalc()
|
||||
destination.topLeft = points[0]
|
||||
|
||||
Reference in New Issue
Block a user