-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Math optimizations #2115
Math optimizations #2115
Conversation
8ac5e0b
to
c1295e4
Compare
c1295e4
to
b670396
Compare
What is inl file? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer just implement inline APIs in class define directly, don't create individual .inl file if the inline APIs are public
Should I put definitions with declarations like so: class Color {
void method() { doStuff(); }
}; or keep declarations clean and put definitions at the end of file like this: class Color {
void method();
};
void Color::method() { doStuff(); } or maybe something in between, like keep shorter definitions with declarations, but keep larger definitions at the end of file? |
I prefer first one, less code |
* Mat4: make some methods inlineable * Vec3: make some methods inlineable * Vec4: make some methods inlineable * Color: make some methods inlineable * Quaternion: make some methods inlineable * Rect: make some methods inlineable * Vec2: make some methods inlineable * Math: mark constants inline * Math: fix DLL build * Vec2: make constants inlineable * Color: remove inline file * Mat4: remove inline file * Quaternion: remove inline file * Rect: remove inline file * Vec2: remove inline file * Vec3: remove inline file * Vec4: remove inline file
* Mat4: make some methods inlineable * Vec3: make some methods inlineable * Vec4: make some methods inlineable * Color: make some methods inlineable * Quaternion: make some methods inlineable * Rect: make some methods inlineable * Vec2: make some methods inlineable * Math: mark constants inline * Math: fix DLL build * Vec2: make constants inlineable * Color: remove inline file * Mat4: remove inline file * Quaternion: remove inline file * Rect: remove inline file * Vec2: remove inline file * Vec3: remove inline file * Vec4: remove inline file
Mostly moves some trivial and commonly used methods in math classes to headers so that they can be inlined by compiler.