Put KiCad on a diet to remove the uncessary slices of pi. (fixes 1066194)

This commit is contained in:
Wayne Stambaugh 2012-10-17 16:59:05 -04:00
parent f03b9048fe
commit f3cc32f9e2
3 changed files with 18 additions and 16 deletions

View File

@ -12,23 +12,23 @@
#endif
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWindows headers
// need because it includes almost all "standard" wxWidgetss headers
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
/*
* FIXME: This appears to already be included in the OSX build of wxWidgets.
* Will someone with OSX please remove this and see if it compiles.
/**
* @note This appears to already be included in the OSX build of wxWidgets.
* Will someone with OSX please remove this and see if it compiles?
*/
#ifdef __WXMAC__
#include <Carbon/Carbon.h>
#endif
#ifndef M_PI
#define M_PI 3.141592653
#endif
/**
* @note Shouldn't we be using wxFileName::GetPathSeparator() instead of the following code
* for improved portability?
*/
#ifdef __WINDOWS__
#define DIR_SEP '\\'
#define STRING_DIR_SEP wxT( "\\" )
@ -37,6 +37,12 @@
#define STRING_DIR_SEP wxT( "/" )
#endif
/**
* @note Do we really need these defined again?
*/
#define UNIX_STRING_DIR_SEP wxT( "/" )
#define WIN_STRING_DIR_SEP wxT( "\\" )
#ifdef DEBUG
#define D(x) x
#else
@ -63,18 +69,14 @@ template <typename T> inline const T& Clamp( const T& lower, const T& value, con
return value;
}
#define UNIX_STRING_DIR_SEP wxT( "/" )
#define WIN_STRING_DIR_SEP wxT( "\\" )
#define USE_RESIZE_BORDER
#if defined(__UNIX__) || defined(USE_RESIZE_BORDER)
#define MAYBE_RESIZE_BORDER wxRESIZE_BORDER // linux users like resizeable
// borders
#define MAYBE_RESIZE_BORDER wxRESIZE_BORDER // Linux users like resizeable borders
#else
#define MAYBE_RESIZE_BORDER 0 // no resizeable border
#endif
// wxNullPtr is not defined prior to wxWidget 2.9.0.
// wxNullPtr is not defined prior to wxWidgets 2.9.0.
#if !wxCHECK_VERSION( 2, 9, 0 )
#define wxNullPtr ((void *)NULL)
#endif

View File

@ -320,7 +320,7 @@ static void gen_arc( std::vector <wxPoint>& aBuffer,
if( seg_count == 0 )
seg_count = 1;
double increment_angle = (double) a_ArcAngle * 3.14159 / 1800 / seg_count;
double increment_angle = (double) a_ArcAngle * M_PI / 1800 / seg_count;
// Creates nb_seg point to approximate arc by segments:
for( int ii = 1; ii <= seg_count; ii++ )

View File

@ -137,7 +137,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
* For a circle the min radius is radius * cos( 2PI / s_CircleToSegmentsCount / 2)
* s_Correction is 1 /cos( PI/s_CircleToSegmentsCount )
*/
s_Correction = 1.0 / cos( 3.14159265 / s_CircleToSegmentsCount );
s_Correction = 1.0 / cos( M_PI / s_CircleToSegmentsCount );
// This KI_POLYGON_SET is the area(s) to fill, with m_ZoneMinThickness/2
KI_POLYGON_SET polyset_zone_solid_areas;