NEURON
MyMath Class Reference

#include <mymath.h>

Public Types

enum  { Expand, Contract, Higher, Lower }
 

Static Public Member Functions

static void extend (Extension &, Coord)
 
static void extend (Extension &, const Extension &)
 
static void minmax (Coord &min, Coord &max)
 
static bool inside (Coord x, Coord min, Coord max)
 
static float min (int count, const float *)
 
static float max (int count, const float *)
 
static bool inside (Coord x, Coord y, Coord left, Coord bottom, Coord right, Coord top)
 
static bool near_line (Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2, float epsilon)
 
static bool near_line_segment (Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2, float epsilon)
 
static float distance_to_line_segment (Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2)
 
static float distance_to_line (Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2)
 
static float norm2 (Coord x, Coord y)
 
static bool unit_normal (Coord x, Coord y, Coord *perp)
 
static void round_range (Coord x1, Coord x2, double &y1, double &y2, int &ntic)
 
static void round_range_down (Coord x1, Coord x2, double &y1, double &y2, int &ntic)
 
static double round (float &x1, float &x2, int direction, int digits)
 
static void box (Requisition &, Coord &x1, Coord &y1, Coord &x2, Coord &y2)
 
static double anint (double)
 
static double resolution (double)
 
static bool lt (double x, double y, double e)
 
static bool le (double x, double y, double e)
 
static bool eq (double x, double y, double e)
 
static bool eq2 (double x, double y, double e)
 

Detailed Description

Definition at line 11 of file mymath.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Expand 
Contract 
Higher 
Lower 

Definition at line 70 of file mymath.h.

Member Function Documentation

◆ anint()

double MyMath::anint ( double  x)
static

Definition at line 86 of file mymath.cpp.

◆ box()

void MyMath::box ( Requisition req,
Coord x1,
Coord y1,
Coord x2,
Coord y2 
)
static

Definition at line 364 of file mymath.cpp.

◆ distance_to_line()

float MyMath::distance_to_line ( Coord  x,
Coord  y,
Coord  x1,
Coord  y1,
Coord  x2,
Coord  y2 
)
static

Definition at line 145 of file mymath.cpp.

◆ distance_to_line_segment()

float MyMath::distance_to_line_segment ( Coord  x,
Coord  y,
Coord  x1,
Coord  y1,
Coord  x2,
Coord  y2 
)
static

Definition at line 168 of file mymath.cpp.

◆ eq()

static bool MyMath::eq ( double  x,
double  y,
double  e 
)
inlinestatic

Definition at line 80 of file mymath.h.

◆ eq2()

static bool MyMath::eq2 ( double  x,
double  y,
double  e 
)
inlinestatic

Definition at line 81 of file mymath.h.

◆ extend() [1/2]

void MyMath::extend ( Extension e,
Coord  x 
)
inlinestatic

Definition at line 89 of file mymath.h.

◆ extend() [2/2]

void MyMath::extend ( Extension e,
const Extension x 
)
inlinestatic

Definition at line 84 of file mymath.h.

◆ inside() [1/2]

bool MyMath::inside ( Coord  x,
Coord  min,
Coord  max 
)
inlinestatic

Definition at line 97 of file mymath.h.

◆ inside() [2/2]

bool MyMath::inside ( Coord  x,
Coord  y,
Coord  left,
Coord  bottom,
Coord  right,
Coord  top 
)
inlinestatic

Definition at line 101 of file mymath.h.

◆ le()

static bool MyMath::le ( double  x,
double  y,
double  e 
)
inlinestatic

Definition at line 79 of file mymath.h.

◆ lt()

static bool MyMath::lt ( double  x,
double  y,
double  e 
)
inlinestatic

Definition at line 78 of file mymath.h.

◆ max()

float MyMath::max ( int  count,
const float *  x 
)
static

Definition at line 103 of file mymath.cpp.

◆ min()

float MyMath::min ( int  count,
const float *  x 
)
static

Definition at line 93 of file mymath.cpp.

◆ minmax()

void MyMath::minmax ( Coord min,
Coord max 
)
inlinestatic

Definition at line 93 of file mymath.h.

◆ near_line()

bool MyMath::near_line ( Coord  x,
Coord  y,
Coord  x1,
Coord  y1,
Coord  x2,
Coord  y2,
float  epsilon 
)
static

Definition at line 115 of file mymath.cpp.

◆ near_line_segment()

bool MyMath::near_line_segment ( Coord  x,
Coord  y,
Coord  x1,
Coord  y1,
Coord  x2,
Coord  y2,
float  epsilon 
)
static

Definition at line 200 of file mymath.cpp.

◆ norm2()

static float MyMath::norm2 ( Coord  x,
Coord  y 
)
inlinestatic

Definition at line 56 of file mymath.h.

◆ resolution()

static double MyMath::resolution ( double  )
static

◆ round()

double MyMath::round ( float &  x1,
float &  x2,
int  direction,
int  digits 
)
static

Definition at line 335 of file mymath.cpp.

◆ round_range()

void MyMath::round_range ( Coord  x1,
Coord  x2,
double &  y1,
double &  y2,
int ntic 
)
static

Definition at line 281 of file mymath.cpp.

◆ round_range_down()

void MyMath::round_range_down ( Coord  x1,
Coord  x2,
double &  y1,
double &  y2,
int ntic 
)
static

Definition at line 306 of file mymath.cpp.

◆ unit_normal()

bool MyMath::unit_normal ( Coord  x,
Coord  y,
Coord perp 
)
static

Definition at line 373 of file mymath.cpp.


The documentation for this class was generated from the following files: