Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Simplify & refactor Vector2 #1

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

MaxGraey
Copy link

Better avoid aggregated TypedArrays inside Math primitives like Vector2, Matrix, Quaternion and etc. In AS much more efficiently when you have less indirections. Also TypedArrays required bounds checks which also not efficient. So as example I refactored and simplify Vector2 class. It is better to refactor all other primitives in Math using the same example

@mrchantey
Copy link
Owner

This is great, I hadn't considered the cost of abstraction. I'll have a play with how this can work with linear data layouts, and then come back to the PR.

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

Successfully merging this pull request may close these issues.

None yet

2 participants