GithubHelp home page GithubHelp logo

Comments (2)

MikeLankamp avatar MikeLankamp commented on August 17, 2024 1

I've noticed that issue as well. I think the is_integral assertion also fails for boost::multiprecision.

Edit: I see you're asking about IntermediateType, not BaseType. Yes, then the is_signed check is all that matters. My comment is basically #8.

I've tried to think of better alternatives, but there's really no good way to verify that a type acts like an integer. I don't think even C++20's concepts allow you to test that e.g. T{0} / 2 == T{0} (a property usually true for integers). In other words, C++ has no static "duck-typing" checks.

There may be no option than removing those checks, adding proper documentation and hoping people only use integer-like types. If you (or anyone) has other alternatives, I'm all ears.

And I'm glad to hear you find this library useful! The trigonometry stuff might be improvable in accuracy or performance, but that requires a level of knowledge of math I don't posses :)

from fpm.

mdragon159 avatar mdragon159 commented on August 17, 2024

As a side note, this isn't a big deal/high priority for me at all as I just need to comment out the relevant static_assert (and very carefully test). Unfortunately this does prevent me from using this library directly as a git submodule, but that's not a significant concern at all.

On a different note, thank you very very much for making this library. It's much easier to use than CNL as well has the trig functionality I needed, plus the various documentation with library comparisons incl. regarding performance made me very comfortable starting to use this library. This is overall saving me a ton of time in making a cross-platform deterministic game with fixed points under the hood. Ty again ^_^

from fpm.

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.