Comments (6)
I don't really see the point of fastCos or fastSin, how often are you using 100s of sin per frame and more importantly how often are you EVER using tan?
Also I'm strongly against solutions in search of a problem if you have a valid need for this in a project, let me know
from flixel.
May I ask if you're against having them, then why do they exist in the first place?
from flixel.
I didn't add them, they were in the flash version
As for why they exist, because there were 100s of people contributing to flash flixel and people really like adding features that they think might be useful one day
from flixel.
if you have a valid need for this in a project, let me know
People who make modcharting frameworks in flixel use tangent in some of the modifiers a lot and it could help here.
from flixel.
I think at this point, Math.sin is a bit faster than fastSin, at least when I tested it here:
https://try.haxe.org/#7b0FAA6C
And I also tested on cpp on windows and Math.sin seems to be faster
from flixel.
Your modcharting example doesn't seem to use tan 100s of times per second to the point where a faster implementation would have any noticeable effect, it also REALLY seems like this is a "Solution in search of a problem". I can't stress enough that I am only interested in PRs that offer solutions to problems you are actually facing now. not "Well this exists so maybe I should make this similar thing, I have no use for it, but other people might need it". Furthermore "fast" function like this need to be speed tested for performance before being added.
This issue raised red flags from the get go, because if there was any practical use for fast tan I would have expected to see an issue phrased like this:
"Hey I noticed some slowdown in my game and used profiling to determine that it's these costly Math.tan functions, I don't need the precision it offers so I researched a faster version and it made a noticeable difference. at first I was just gonna add it to my game's utils since it's like 4 lines of code, but then I saw FlxMath has similar tools so I thought I'd add it there". The dev :
- discovers a problem in their game using dev tools for performance
- fixes the problem in their game
- tests the solution
- adds the solution to Flixel
from flixel.
Related Issues (20)
- Batch Async utils
- add onAdded/onRemoved?
- Destroy bug I think HOT 12
- Detect changes to clipRect without needing to reset the field in order to take effect HOT 2
- Improve Performance of Debug Drawing HOT 8
- Code Climate, I love you but you're bringing me down HOT 1
- DrawTriangle's rendering broken, not rendering HOT 4
- Graphic getting destroyed when recycling HOT 2
- FlxSprite twitching when a pixel-perfect camera follows a FlxSprite HOT 2
- Xbox One Controller not working on MacOS cpp builds HOT 8
- FlxPointer.getScreenPosition is returning impossible numbers HOT 2
- No publicly accessible functionality to get global screen position in FlxPointer HOT 2
- FlxCamera.fill() uses blend mode of the last drawn item on camera HOT 2
- FlxAnimationController.callback should be an FlxSignal HOT 3
- FlxCamera.color is not functional HOT 1
- FlxAnimationController.finishCallback does not trigger on looped animations HOT 8
- Rendering artifacts are shown when an flxsprite's angle is not 0 or 180 HOT 11
- FlxButton `labelOffset`s aren't updating the label's position. HOT 3
- Console key events getting blocked
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flixel.