Thread: fmod %

  1. #1
    Registered User
    Join Date
    Oct 2001

    fmod %

    So I heard you can't use the modulus operator with floats. You need to use fmod. So my question is, why didn't they just make the operator do that? Is there some technical reason behind it or something?

  2. #2
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    New Zealand
    Perhaps because mod is usually the remainder after division, but in floating point there never is any remainder with division.
    Or maybe you'd just have to ask the language inventors.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. FMOD implimentation, how'd you do it?
    By Jeremy G in forum Game Programming
    Replies: 10
    Last Post: 06-12-2004, 12:04 AM
  2. compiling a simple Fmod program
    By lambs4 in forum Game Programming
    Replies: 2
    Last Post: 04-27-2004, 12:11 PM
  3. Does fmod only support 3D sound with .wave?
    By Silvercord in forum Game Programming
    Replies: 3
    Last Post: 04-04-2004, 07:03 PM
  4. error with fmod() function
    By minesweeper in forum C++ Programming
    Replies: 3
    Last Post: 08-30-2003, 05:24 AM
  5. Fmod and windows programming
    By AtomRiot in forum Windows Programming
    Replies: 1
    Last Post: 01-06-2003, 02:13 PM
Website Security Test