Computer Science Canada drawfill arc |
Author: | starlight [ Sun Apr 24, 2005 9:07 pm ] | ||||
Post subject: | drawfill arc | ||||
i don't understand why doesn't this command works:
isnt' this same as this?
why doesn't the first cod execute ? |
Author: | Delos [ Sun Apr 24, 2005 9:16 pm ] | ||
Post subject: | |||
Value returned is 0. You're using div. This does not return real numbers, only integers. |
Author: | starlight [ Sun Apr 24, 2005 9:22 pm ] | ||
Post subject: | |||
but if i use
it says the assign value is wrong type. so it there anyway to make p an integer other than use the div function? |
Author: | Bacchus [ Sun Apr 24, 2005 9:25 pm ] |
Post subject: | |
round() |
Author: | starlight [ Sun Apr 24, 2005 9:30 pm ] | ||
Post subject: | |||
actually i know the round function works but i don't think i can use it in my case because i am trying to make a pie graph. and if i use the round function it rounds 0.5 into one which is not what i want.
the 1000 in my program represent the number of times out of 2000 and times 360 degree. so i don't think the round function should be use in my program. |
Author: | Bacchus [ Sun Apr 24, 2005 9:35 pm ] | ||
Post subject: | |||
well there also ur problem, by using div it round the number down, making it 0 then multiplying it by 360 which is 0. wat you need to do is find the angle in real then round it. try
|