SFTtech/openage

Pure fixed-point math functions

Open

#1 543 ouverte le 17 sept. 2023

Voir sur GitHub
 (13 commentaires) (0 réactions) (0 assignés)Python (1 135 forks)batch import
good first issuelang: c++nice new thing ☺

Métriques du dépôt

Stars
 (12 130 stars)
Métriques de merge PR
 (Merge moyen 9j 23h) (1 PR mergée en 30 j)

Description

Required Skills: C++

Difficulty: Easy

We should add additional math operations to our fixed-point implementation, so that all calculations can be done purely deterministic. The fpm library already has these operations and could be used as an inspiration.

Important here: These operations must not use any floating point arithmetic for the calculation. They must receive fixed-point values as input and must also return a fixed-point value. This means std library calculations should not be used for solving this issue.

Interesting for us:

  • sqrt
  • min
  • max
  • abs
  • hypot
  • atan2

Nice to have:

  • sin
  • cos
  • tan
  • pow
  • log

Further Reading

Guide contributeur