Skip to content

Add support for float modulo operator#1953

Merged
psychonic merged 1 commit intoalliedmodders:masterfrom
Mikusch:float-mod
Mar 19, 2023
Merged

Add support for float modulo operator#1953
psychonic merged 1 commit intoalliedmodders:masterfrom
Mikusch:float-mod

Conversation

@Mikusch
Copy link
Contributor

@Mikusch Mikusch commented Mar 15, 2023

alliedmodders/sourcepawn/#764 added the float modulo operator but it was still unsupported in SourceMod until now.

This PR adds the required native and updates the include.

Test plugin:

#include <float>

public void OnPluginStart()
{
	float fMod1 = 7.0 % 5.0;
	float fMod2 = 8 % 5.0;
	float fMod3 = 9.0 % 5;
	
	PrintToServer("%0.f, %0.f, %0.f", fMod1, fMod2, fMod3);
}

@psychonic psychonic merged commit 5539484 into alliedmodders:master Mar 19, 2023
@Mikusch Mikusch deleted the float-mod branch March 19, 2023 16:25
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