playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Updates & Downloads
»
Share New Actions
(Moderator:
600
) »
Float Modulo
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Float Modulo (Read 4468 times)
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Float Modulo
«
on:
June 19, 2013, 03:32:11 AM »
Hi,
Following a post where float modulo was required, I created a custom action for it.
bye,
Jean
Logged
Ryandb2
Playmaker Newbie
Posts: 4
Re: Float Modulo
«
Reply #1 on:
July 30, 2016, 03:59:59 PM »
Just in case anyone is thinking of using this function, its worth noting this is not a modulo operation, but rather a remainder operation. % in C# is remainder which will present different results in negative divisor or dividend cases than a true modulo.
https://blogs.msdn.microsoft.com/ericlippert/2011/12/05/whats-the-difference-remainder-vs-modulus/
Stumbled on this as I was getting effectively invalid results for a typical mod operation.
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: Float Modulo
«
Reply #2 on:
August 01, 2016, 05:21:10 AM »
Hi,
ok, very confusing indeed:
http://www.dotnetperls.com/modulo
So, where could I find some definite code on creating a modulo and a remainder.
Bye,
Jean
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: Float Modulo
«
Reply #3 on:
August 01, 2016, 05:24:17 AM »
Hi,
found this:
http://cc.davelozinski.com/c-sharp/use-the-modulus-operator-or-alternative
so, what would be a typical case to check that modulo and remainder are properly working?
Bye,
Jean
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Updates & Downloads
»
Share New Actions
(Moderator:
600
) »
Float Modulo