Menu

To cast or not to cast...

2004-01-30
2012-10-07
  • Brandon Franklin

    Yay!  I finally have one of these to contribute!  :)

    Here's some code I just found:
    id = System.currentTimeMillis() + new Double(Math.random()).longValue();

    Now, what I'm trying to figure out is, why not just do it as:
    id = System.currentTimeMillis() + (long)Math.random();

    ...and the only possible explanation I can come up with is some pathological fear of casting!

     
    • Tom Copeland

      Tom Copeland - 2004-01-30

      Yup, fear of casting... it's good that person isn't a mage.... or a cleric. 

      Tom

       
    • Adrian P

      Adrian P - 2004-03-14

      i'm not so sure - maybe s/he was just lacking the proper reagents for casting; personally, when i'm running low on reagents, i like to scavenge down in the Dungeon of Forums, in the land of Javasuncom. it's rather good, even if you're a low level mage.

      //adrian.

       
      • Tom Copeland

        Tom Copeland - 2004-03-15

        Or not enough mana, perhaps...

        Tom

         

Log in to post a comment.