move basisVector() to member function

This commit is contained in:
Paul Zabelin
2016-02-20 23:21:17 -08:00
parent 0098fcab2c
commit b90a82f6cb
2 changed files with 13 additions and 14 deletions

View File

@@ -13,7 +13,6 @@ class BasisSpec: QuickSpec {
)
)
context("multiply adj by vector") {
it("should match expected") {
let adjM = float3x3([-122, -152, 18544, 122, 0, 0, 0, 152, 0])
@@ -27,13 +26,13 @@ class BasisSpec: QuickSpec {
context("basis") {
it("should match fiddle") {
let startBasis = normalize(float3x3([0, 2818688, 0, 0, 0, 2262368, -18544, 18544, 18544]))
let result = basis(start)
let result = start.basisVector()
expect(result) startBasis ± 0.5
}
it("should work for destination") {
let destBasis = normalize(float3x3([-4000000, 12000000, 4000000, -4000000, 4000000, 12000000, -40000, 40000, 40000]))
let result = basis(destination)
let result = destination.basisVector()
expect(result) destBasis ± 0.5
}
}