Skip to content

Commit b6700cf

Browse files
authored
Merge pull request #4 from fireblade-engine/feature/euler
Add Euler Angle / Quaternion conversions
2 parents 6008d56 + de9c122 commit b6700cf

File tree

11 files changed

+899
-110
lines changed

11 files changed

+899
-110
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,18 @@ jobs:
1111
runs-on: macOS-latest
1212
strategy:
1313
matrix:
14-
xcode: ["11.7", "12.1"]
14+
xcode: ["11.7", "12.4"]
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@master
1818
- name: Select Xcode ${{ matrix.xcode }}
1919
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
20-
- name: Swift version
21-
run: swift --version
2220
- name: Test
23-
run: swift test -v --skip-update --parallel --enable-test-discovery --enable-code-coverage
21+
run: make test
2422
env:
2523
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
2624
- name: Build Release
27-
run: swift build -c release
25+
run: make buildRelease
2826
env:
2927
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
3028

@@ -38,28 +36,7 @@ jobs:
3836
steps:
3937
- name: Checkout
4038
uses: actions/checkout@master
41-
- name: "Update APT"
42-
shell: bash
43-
run: "apt update"
44-
- name: "Install curl"
45-
shell: bash
46-
run: "apt-get install -y curl"
47-
- name: Swift version
48-
run: swift --version
4939
- name: Test
50-
run: swift test -v --skip-update --parallel --enable-test-discovery --enable-code-coverage
40+
run: make test
5141
- name: Build Release
52-
run: swift build -c release
53-
54-
55-
# webAssembly:
56-
# runs-on: ubuntu-20.04
57-
# steps:
58-
# - name: Checkout
59-
# uses: actions/checkout@master
60-
# - name: Swift version
61-
# run: swift --version
62-
# - name: Build
63-
# uses: swiftwasm/swiftwasm-action@main
64-
# with:
65-
# shell-action: carton test
42+
run: make buildRelease

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.1.3
1+
5.3.2

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018-2020 Christian Treffs
3+
Copyright (c) 2018-2021 Christian Treffs
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

Makefile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ genLinuxTests:
2222
swift test --generate-linuxmain
2323
swiftlint autocorrect --format --path Tests/
2424

25-
test: genLinuxTests
26-
swift test
25+
test:
26+
swift test -c release --skip-update --parallel --enable-code-coverage
27+
28+
buildRelease:
29+
swift build -c release
2730

2831
# Package
2932
latest:
@@ -42,10 +45,10 @@ genXcodeOpen: genXcode
4245
# Clean
4346
clean:
4447
swift package reset
45-
rm -rdf .swiftpm/xcode
46-
rm -rdf .build/
47-
rm Package.resolved
48-
rm .DS_Store
48+
-rm -rdf .swiftpm/xcode
49+
-rm -rdf .build/
50+
-rm Package.resolved
51+
-rm .DS_Store
4952

5053
cleanArtifacts:
5154
swift package clean

Sources/FirebladeMath/Matrix/Matrix4x4+Projections.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ extension Mat4x4f {
141141
*/
142142

143143
let m00: Float = 2.0 / (right - left) // 2/(r-l)
144-
let m03: Float = (left + right) / (left - right) //(l+r)/(l-r)
144+
let m03: Float = (left + right) / (left - right) // (l+r)/(l-r)
145145
let m11: Float = 2.0 / (top - bottom) // 2/(t-b)
146146
let m13: Float = (top + bottom) / (bottom - top) // (t+b)/(b-t)
147147
let m22: Float = 1.0 / (zFar - zNear) // 1/(zf-zn)

Sources/FirebladeMath/Matrix/MatrixStorage.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
public protocol Storage4x4Protocol: RandomAccessCollection, MutableCollection, RangeReplaceableCollection, Equatable {
99
associatedtype Value: StorageScalar
10-
//associatedtype _Storage3x3: Storage3x3Protocol where _Storage3x3.Value == Value
10+
// associatedtype _Storage3x3: Storage3x3Protocol where _Storage3x3.Value == Value
1111
typealias Column = SIMD4<Value>
1212

1313
init(_ columns: [Column])
@@ -29,7 +29,7 @@ extension Storage4x4Protocol where Element == Value, Index == Int {
2929

3030
public protocol Storage3x3Protocol: RandomAccessCollection, MutableCollection, RangeReplaceableCollection, Equatable {
3131
associatedtype Value: StorageScalar
32-
//associatedtype _Storage4x4: Storage4x4Protocol where _Storage4x4.Value == Value
32+
// associatedtype _Storage4x4: Storage4x4Protocol where _Storage4x4.Value == Value
3333
typealias Column = SIMD3<Value>
3434

3535
init(_ columns: [Column])

0 commit comments

Comments
 (0)