mirror of
https://github.com/zhigang1992/PerspectiveTransform.git
synced 2026-01-12 22:49:33 +08:00
18 lines
451 B
Swift
18 lines
451 B
Swift
import Quick
|
|
import Nimble
|
|
import simd
|
|
|
|
class VectorProjectionSpec: QuickSpec {
|
|
override func spec() {
|
|
describe("vector projection") {
|
|
it("should be 0 orthogonally") {
|
|
let v12 = vector_float2(1, 0)
|
|
let v23 = vector_float2(0, 1)
|
|
let projection = project(v12, v23)
|
|
expect(projection.x) == 0
|
|
expect(projection.y) == 0
|
|
}
|
|
}
|
|
}
|
|
}
|