What is the standard or convention for functions in speducode
For example I have this. Would I specifically declare the variables as is? My attempt is below
Code:void CB1::midpointline(int x0,int y0, int x1, int y1, CDC *pDc) { int dx,dy,incrE,incrNE,d,x,y; dx=x1-x0; dy=y1-y0; d=dy*2-dx; incrE=dy*2; incrNE=(dy-dx)*2; x=x0; y=y0; }Code:Create function mindpointline(StartPoint x0 , StartPoint y0 , EndPoint x1 , EndPoint y1 , Pointer to Device Context) Set Delta(X) to x1-x0 Set Delta(y) to y1-y0 Set decision to 2*dy-dx set Delta(E) to dy*2 set Delta(NE) to 2*(dy-dx) set x to equal x0 set y to equal y0 Draw pixel with X and Y values End functiojn



LinkBack URL
About LinkBacks


