This commit is contained in:
Paul Zabelin
2019-03-17 21:20:37 -07:00
parent 2ad52efe22
commit cf20cb7298
9 changed files with 37 additions and 37 deletions

View File

@@ -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))

View File

@@ -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") {

View File

@@ -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!

View File

@@ -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 {

View File

@@ -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]