Why such code don't work?

And how correctly do that?Code:`Math M = Math();`

PossibleCount = M.round((g.getClipHeight - 40)/20);

Printable View

- 01-01-2010, 06:23 AMartemffHow correctly invoke function "round"?
Why such code don't work?

Code:`Math M = Math();`

PossibleCount = M.round((g.getClipHeight - 40)/20);

- 01-01-2010, 06:30 AMFubarable
1. Please clarify "doesn't work". Feel free to use give us as much information as necessary to answer your question.

2. round is a static method. You don't create a Math object, you simply call the method on the Math class.

So it's not:

Code:`Math M = Math();`

int foo = M.round(...);

but instead

Code:`//Math M = Math();`

int foo = Math.round(...);

- 01-01-2010, 12:31 PMartemff
Today 05:30 AM

Fubarable, Thanks.