Skip to content

Conversation

suve
Copy link
Contributor

@suve suve commented Aug 18, 2025

This PR adds missing floating-point arithmetic functions to SDL_stdinc.

As was the case in SDL2, since function names are case-insensitive in Pascal, there is a duplicate identifier conflict between SDL_log (calculate natural logarithm) and SDL_Log (log a message). As before, I've opted to rename SDL_log to SDL_logn - making it resemble SDL_log10, the other logarithm function. An alternative approach would be to mark both SDL_Log and SDL_log as overload.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there, great etxension. Please have a look at my two comments.

* \sa SDL_lognf
* \sa SDL_log10
* \sa SDL_exp
*}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe extend this comment by the explanation for the different function name (SDL_logn) as given for this pull request.

"SDL3-for-Pascal: We changed the function name ..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The explanation is already there.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry! My bad! Missed your notes.

Please extend the note specifically by "SDL3-for-Pascal NOTE: ..." (or similar). Otherwise our notes are hardly to distinguish from original notes. Then this would be ready to merge and you could merge. I could add this, too if you like. Let me know how to proceed.

Best regards

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed. Feel free to edit further, if needed.

*
* \sa SDL_logn
* \sa SDL_expf
*}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above, same could be applied here.

@suve suve force-pushed the add-more-stdinc-symbols branch from 8973c8d to 876518c Compare September 1, 2025 16:58
@Free-Pascal-meets-SDL-Website
Copy link
Contributor

Excellent!

@Free-Pascal-meets-SDL-Website Free-Pascal-meets-SDL-Website merged commit 824fcb3 into PascalGameDevelopment:main Sep 2, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants