Git Product home page Git Product logo

Comments (6)

Geokureli avatar Geokureli commented on August 15, 2024

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.

Vortex2Oblivion avatar Vortex2Oblivion commented on August 15, 2024

May I ask if you're against having them, then why do they exist in the first place?

from flixel.

Geokureli avatar Geokureli commented on August 15, 2024

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.

Vortex2Oblivion avatar Vortex2Oblivion commented on August 15, 2024

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.

UncertainProd avatar UncertainProd commented on August 15, 2024

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.

Geokureli avatar Geokureli commented on August 15, 2024

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 :

  1. discovers a problem in their game using dev tools for performance
  2. fixes the problem in their game
  3. tests the solution
  4. adds the solution to Flixel

from flixel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.