|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#11
|
||||
|
||||
|
Re: remainder function
I do use it. But I don't want to be telling other people to use my custom function if there's already a perfectly good remainder function provided with FRC C++. I don't have access to a working C++ installation, otherwise I would test it myself. I am seeking help from knowledgeable C++ users on this forum.
Quote:
Quote:
For example, the IEC60559 remainder function can take any angle and normalize it to the range -180..+180 with a single C instruction: normalizedAngle = remainder(angle,360); I'd like to know if the remainder function is supported in FRC C++ so I can recommend it to students who are trying to do this type of conversion. Neither the fmod() function nor the % operator can replicate the functionality of the remainder() function without using a bunch of conditional logic If there are any Java programmers following this thread, Java appears to have the IEC 60559 remainder function; in Java it is called IEEERemainder. See attachments. If someone would be willing to test that (compare it to the implementation I posted ealier in this thread) I'd be grateful. qualm /kwä(l)m/ Noun 1) An uneasy feeling of doubt, worry, or fear; a misgiving. 2) A momentary faint or sick feeling. Synonyms nausea - queasiness |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|