DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T g

⟦55e1a1a1c⟧ TextFile

    Length: 597 (0x255)
    Types: TextFile
    Names: »getwirelen.c«

Derivation

└─⟦87ddcff64⟧ Bits:30001253 CPHDIST85 Tape, 1985 Autumn Conference Copenhagen
    └─ ⟦this⟧ »cph85dist/wirewrap/getwirelen.c« 

TextFile

#define sqr(a) ( (a)*(a) )
#include <math.h>
#include "wirewrap.h"
double getwirelength(row1,col1,row2,col2)
int row1,col1,row2,col2;
{
double wlength;

/* Compute straight line distance. */

wlength = .1 * sqrt((double) sqr(row1-row2)+sqr(col1-col2));

/* Apply linear regression coefficients */

wlength = wlength * lengthfactor + pinpart;

/* Round up to the nearest larger .5 inch */

wlength = wlength * 2 + 1;
wlength = (int) wlength;
wlength = wlength/2.0;

/* Make sure that it is at least as long as the minimum length. */

if(wlength < minlength) wlength = minlength;
return(wlength);
}