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

Remove CRT #16

Closed
StrangeZak opened this issue Aug 13, 2016 · 4 comments
Closed

Remove CRT #16

StrangeZak opened this issue Aug 13, 2016 · 4 comments

Comments

@StrangeZak
Copy link
Member

Remove use of the CRT (Math.h) in HandmadeMath, this involved replacing Sin, Con, and Tan with our own version of these operations.

@kiljacken
Copy link
Contributor

Just sharing my $0.02 again here, such that they're documented somewhere.

The trigonometric functions are, to say the least, problematic to implement. You can basically pick one of the following options: widely compatible or fast. As you'd not want to maintain platform dependent inline assembly for all used architectures, platforms, and compilers, the slow route would have to be taken.

However, a possible solution could be the STB style of function definitions, allowing the user of Handmade-Math to pass in their own Sin/Cos/Tan and fallback to math.h if no such functions are provided.

@StrangeZak
Copy link
Member Author

Yeah, writing SSE efficient Sin, Cos, and Tan will be crazy hard and will take more time then they are probably worth.

@StrangeZak
Copy link
Member Author

I think the STB approach you are saying might be the way to go about these things.

@StrangeZak
Copy link
Member Author

@kiljacken I did what you said in 0.4 the most recent commit, that i pushed today onto the master repo. It worked great :)

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

No branches or pull requests

2 participants