KiCad PCB EDA Suite
units.h File Reference
#include <config.h>
#include <cmath>
#include "units_scales.h"

Go to the source code of this file.

Macros

#define MU0   12.566370614e-7
 
#define C0   299792458.0
 
#define ZF0   376.730313668
 

Functions

double asinh (double x)
 
double acosh (double x)
 
double atanh (double x)
 

Macro Definition Documentation

◆ C0

#define C0   299792458.0

Definition at line 61 of file units.h.

◆ MU0

#define MU0   12.566370614e-7

Definition at line 60 of file units.h.

◆ ZF0

#define ZF0   376.730313668

Definition at line 62 of file units.h.

Function Documentation

◆ acosh()

double acosh ( double  x)
inline

Definition at line 40 of file units.h.

41{
42 // must be x>=1, if not return Nan (Not a Number)
43 if( x < 1.0 ) return sqrt( -1.0 );
44
45 // return only the positive result (as sqrt does).
46 return log( x+sqrt( x*x-1.0 ) );
47}

Referenced by TWISTEDPAIR::calcAnalyze(), C_MICROSTRIP::syn_err_fun(), and C_MICROSTRIP::synth_width().

◆ asinh()

double asinh ( double  x)
inline

Definition at line 33 of file units.h.

34{
35 return log( x+sqrt(x*x+1) );
36}

◆ atanh()

double atanh ( double  x)
inline

Definition at line 51 of file units.h.

52{
53 // must be x>-1, x<1, if not return Nan (Not a Number)
54 if( !(x>-1.0 && x<1.0) ) return sqrt( -1.0 );
55
56 return log( (1.0+x)/(1.0-x) ) / 2.0;
57}

Referenced by MICROSTRIP::delta_Z0_cover(), and C_MICROSTRIP::delta_Z0_even_cover().