add more missing `round` defines for compat/msvc.h
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start in compat/msvc.h by reading the existing roundf workaround and compare it with the proposed roundd and roundl definitions. Check whether these functions are missing in the targeted earlier MSVC versions, then verify the compatibility build; done means the needed defines are present without breaking supported builds.
Written by the indexing model from the issue text.
Description
Earlier MSVCs are missing some math.h functions that other compilers have. There is already a #define for roundf in msvc.h that works around one of the missing round functions.
I thought I was going to need one or two more round functions so I drafted two additions, but it turns out I do not have a use case at the moment to test these with. For now I'm including the existing roundf define below for reference, along the two new drafts.
#define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f))
#define roundd(in) (in >= 0.0 ? floor(in + 0.5) : ceil(in - 0.5))
#define roundl(in) (in >= 0.0 ? floor(in + 0.5) : ceil(in - 0.5))
- Dominant language
- C
- Stars
- 183
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from libretro/libretro-common
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
libretro/libretro-common#220 · 1 comment · 1 reaction ·
-
RETRO_ENVIRONMENT_ clash in libretro.hMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
libretro/libretro-common#89 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
libretro/libretro-common#223 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
libretro/libretro-common#221 · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
libretro/libretro-common#213 ·
All issues in libretro/libretro-common
Similar issues
-
ai-driven-fuzzing bug claude Minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
linagora/open-bastion#425 ·
Maintainers usually reply within 1 day
-
question
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
follow-up Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
moonbitlang/async#713 ·
Maintainers usually reply within 1 day
-
examples/dnsdoctor: cleanup.sh stops at the first missing piece of a setup.sh that did not finishOpenseverity: low
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
luainkernel/lunatik#2263 ·
Maintainers usually reply within 1 day