KiCad PCB EDA Suite
bezier_curves.cpp File Reference
#include <fctsys.h>
#include <bezier_curves.h>

Go to the source code of this file.

Functions

static double calc_sq_distance (int x1, int y1, int x2, int y2)
 
static double sqrt_len (int dx, int dy)
 

Function Documentation

static double calc_sq_distance ( int  x1,
int  y1,
int  x2,
int  y2 
)
inlinestatic

Definition at line 33 of file bezier_curves.cpp.

Referenced by BEZIER_POLY::recursiveBezier().

34 {
35  int dx = x2 - x1;
36  int dy = y2 - y1;
37 
38  return (double)dx * dx + (double)dy * dy;
39 }
static double sqrt_len ( int  dx,
int  dy 
)
inlinestatic

Definition at line 42 of file bezier_curves.cpp.

Referenced by BEZIER_POLY::recursiveBezier().

43 {
44  return ((double)dx * dx) + ((double)dy * dy);
45 }