I got a question how long would an hour be in the sleep() proc?
Would it be sleep(7200)?
Please help and do not talk trash this is only a question...
ID:264242
Nov 12 2008, 11:13 pm
|
|
Nov 12 2008, 11:30 pm
|
|
There's 10 ticks per second. That means it'd be 10 * 60 (60 seconds/minute) * 60 (60 minutes/hour).
|
In response to Popisfizzy
|
|
So I just multiply 10 by 600 and I got my answer?
|
In response to Gizhy Games
|
|
10*60*60 != 10*600
10*60*60 = 10*60 * 60 = 600 * 60, which is six times larger than 10 * 600. |
In response to Gizhy Games
|
|
You need to use basic order of operations you learn in Pre Algebra as well, not just BYOND order of operations. Reading from left to right you do...
1) exponents 2) parentheses (nested or not) 3) multiplication and/or division 4) addition and/or subtraction Do those in that specific order when combining like terms and you should be able to do any math (algebra and before), very easily. |
In response to Mizukouken Ketsu
|
|
Actually, the order is:
1) parentheses in order of the most deeply nested to the least deeply 2) exponents 3) multiplication and/or division 4) addition and/or subtraction |
In response to Jeff8500
|
|
2) exponents and roots *
o.o |
In response to Andre-g1
|
|
Oops, yeah, I don't usually think of square roots because I typically only find them in normal equations (I only end up seeing them in that one kind of problem involving those numbers that I can't think of the name of).
|
In response to Andre-g1
|
|
This is being pedantic, but roots are essentially the same thing as exponents, except a root is fractional. Of course, division is just multiplication by a fraction, and addition is the same as adding a negative, so you can state a lot of things in a lot of different ways.
Also, your normal order-of-operations won't work in programming languages. Most math doesn't need to deal with Boolean or bitwise logic. |
In response to Popisfizzy
|
|
Also, your normal order-of-operations won't work in programming languages. Most math doesn't need to deal with Boolean or bitwise logic. Confucius say always use grouping symbols when unsure. |
In response to Jeff8500
|
|
In lanugages like C++ and Java? Maybe not. I would't know. But in DM, it does matter.
|
In response to Mizukouken Ketsu
|
|
... what are you talking about?
|
In response to Popisfizzy
|
|
"Also, your normal order-of-operations won't work in programming languages. Most math doesn't need to deal with Boolean or bitwise logic." ~Popisfizzy
That ^ o.O It may have nothing to do with booleanor bitwise logic, but it does matter when you're doing simple formulas to calculate things like damage and whatnot in your games. |
In response to Mizukouken Ketsu
|
|
Yes, for basic formulas it does. But the order-of-operations in DM, and lots of other languages, is much, much more fleshed out.
|