Overview
Comment: | OFMatrix4x4: Don't create a singleton
A singleton for the identity matrix makes no sense since OFMatrix4x4 is |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b92457176324e566354afc51cddb3e89 |
User & Date: | js on 2023-02-18 23:53:12 |
Other Links: | manifest | tags |
Context
2023-02-19
| ||
13:37 | OFMatrix4x4: Use 2D arrays in row-major format check-in: 975a812f36 user: js tags: trunk | |
2023-02-18
| ||
23:53 | OFMatrix4x4: Don't create a singleton check-in: b924571763 user: js tags: trunk | |
12:01 | OFMatrix4x4: Transform vectors in 4D space check-in: e31a31bdcb user: js tags: trunk | |
Changes
Modified src/OFMatrix4x4.m from [2f91cc67c5] to [81834eec17].
︙ | ︙ | |||
21 22 23 24 25 26 27 | static const float identityValues[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }; | < < < < < < < < < < < < < < < | | | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | static const float identityValues[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }; @implementation OFMatrix4x4 + (OFMatrix4x4 *)identityMatrix { return [[[OFMatrix4x4 alloc] initWithValues: identityValues] autorelease]; } + (instancetype)matrixWithValues: (const float [16])values { return [[[self alloc] initWithValues: values] autorelease]; } |
︙ | ︙ |