Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Known issue] Swift Compiler Error #3

Closed
zubco opened this issue Apr 25, 2018 · 7 comments
Closed

[Known issue] Swift Compiler Error #3

zubco opened this issue Apr 25, 2018 · 7 comments

Comments

@zubco
Copy link
Contributor

zubco commented Apr 25, 2018

In Xcode Version 9.3 (9E145)

The fallowing files, won't compile because of compiler issue.
Quaternion.swift
Transform3.swift

Reported a bug for that.

@jkolb
Copy link
Owner

jkolb commented Apr 26, 2018

I've actually rewritten the library, but haven't pushed it up yet though. I took out support for everything but Float and Double to help simplify things since integers don't support trig functions and division truncates. This was a big API change though, but I feel it will make things easier in the long run and improves the time it takes to compile also.

I'll go ahead and put a new version right now.

@zubco
Copy link
Contributor Author

zubco commented Apr 26, 2018

Yeah, that solves the issue. Well done. 👍
Thank you for update.

Was using:

typealias Vector2i = Vector2<Int>
typealias Vector3i = Vector3<Int>

in my little game projects, because there was all arithmetic in place already.
In a lot of cases Int is enough for express game world, render it in chunks. And Int arithmetic tend to be faster.

I suppose I will define them now as a separate types for my use cases.

@zubco zubco closed this as completed Apr 26, 2018
@jkolb
Copy link
Owner

jkolb commented Apr 26, 2018

I would be OK with adding Int support back but after battling with the compiler and doing some research I have learned that Swift seems to prefer them to be separate and distinct from the Float variants.

@jkolb
Copy link
Owner

jkolb commented Apr 26, 2018

What operations are you using? Just +, -, *?

@zubco
Copy link
Contributor Author

zubco commented Apr 26, 2018

Yes, those and Equatable conformance will do the job.
Thank you very much for interest, appreciate it. 😎

@jkolb
Copy link
Owner

jkolb commented Apr 27, 2018

It is done 😀

@zubco
Copy link
Contributor Author

zubco commented Apr 27, 2018

Awesome 😃 👍
Thank you very much!! 🙇

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

No branches or pull requests

2 participants