Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

D programming language

Name: Anonymous 2007-02-12 10:38

Name: Anonymous 2007-02-14 7:47

>>26

screen.draw(bez);

is probably preferable to

screen.draw(x1, y1, xMid, yMid, x2, y2, rColor, gColor, bColor);

or whatever you're saying might be more efficient.  Not only is the abstraction more coherent (drawing a curve vs drawing three points and three color components), you're also only copying a pointer versus putting all that jazz on the stack.

Of course, the question of "efficiency" in such a context is very likely moot anyhow.  The overhead of the function call is likely to be dwarfed by the time spent computing the curve.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List