Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

only swift 2.0 #2

Open
fabiosoft opened this issue May 17, 2017 · 2 comments
Open

only swift 2.0 #2

fabiosoft opened this issue May 17, 2017 · 2 comments

Comments

@fabiosoft
Copy link

unfortunately only swift 2.0 compatible

@tr1ckyf0x
Copy link

tr1ckyf0x commented Oct 9, 2017

@fabiosoft There are two forks with Swift 3 and Swift 4 versions
Swift 4 version pull request #3
Swift 3 version pull request #1

@gmcusaro
Copy link

gmcusaro commented Nov 5, 2021

@tr1ckyf0x following the pull request #3 it seems that the multiplication between matrices does not give correct values.

// for example
let first: Matrix = [[0.4124564, 0.3575761, 0.1804375],
                          [0.2126729, 0.7151522, 0.0721750],
                          [0.0193339, 0.1191920, 0.9503041]]
let second: Matrix = [[1.0, 2.0, 3.0], [3.0, 4.0, 5.0], [5.0, 6.0, 7.0]]
print(a * mm)

The output is

[[0.8958039000000001, 2.1454565, 3.1756998000000003], [2.1847303, 4.5292971, 5.581533], [3.4736567000000003, 6.9131377, 7.987366199999999]]

instead

[[2.3873722, 3.3378422, 4.2883122], [2.7190045, 3.7190046000000003, 4.7190047], [5.1284304, 6.2172604, 7.3060903999999995]]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants