SFTtech / openage

Free (as in freedom) open source clone of the Age of Empires II engine 🚀
http://openage.dev
Other
12.68k stars 1.12k forks source link

Fixed point math constants #1544

Closed heinezen closed 10 months ago

heinezen commented 1 year ago

Required Skills: C++

Difficulty: Easy

It would be nice to have common math constants like pi defined using our fixed-point implementation, so that they can be used in fixed-point calculations with deterministic outcome. Floating point constants are already implemented here.

Tasks:

Further Reading

AyiStar commented 10 months ago

@heinezen I opened a WIP PR for adding two fixed point constants, and would be happy to discuss about the implementation and add more constants if everything is ok.

heinezen commented 10 months ago

@AyiStar I've looked at it yesterday and have no complaints so far :)

AyiStar commented 10 months ago

@heinezen Added the rest of the constants in the fixed PR.