File: main.c

package info (click to toggle)
pcb-rnd 3.1.7b-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,108 kB
  • sloc: ansic: 213,400; yacc: 6,241; sh: 4,698; awk: 3,016; makefile: 2,254; lex: 1,166; python: 519; xml: 261; lisp: 154; tcl: 67; perl: 34; javascript: 6; ruby: 5
file content (15 lines) | stat: -rw-r--r-- 377 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
#include "../impedance.c"
int main()
{
	double tt, th, sh, d, res;

	if (scanf("%lf %lf %lf %lf", &tt, &th, &sh, &d) != 4) {
		fprintf(stderr, "need: trace_width, trace_height, subst_height, dielect\n");
		return 1;
	}

	res = pcb_impedance_microstrip(RND_MM_TO_COORD(tt), RND_MM_TO_COORD(th), RND_MM_TO_COORD(sh), d);
	printf("res=%f\n", res);
	return 0;
}