mirror of
https://github.com/zhigang1992/PerspectiveTransform.git
synced 2026-05-08 02:38:36 +08:00
18 lines
456 B
Swift
18 lines
456 B
Swift
import Quick
|
|
import Nimble
|
|
import simd
|
|
|
|
class VectorProjectionSpec: QuickSpec {
|
|
override func spec() {
|
|
describe("vector projection") { () -> () in
|
|
it("should be 0 orthogonally", closure: { () -> () in
|
|
let v12 = vector_float2(1,0)
|
|
let v23 = vector_float2(0,1)
|
|
let p = project(v12, v23)
|
|
expect(p.x) == 0
|
|
expect(p.y) == 0
|
|
})
|
|
}
|
|
}
|
|
}
|