Some minor fixes and cleanup.
This commit is contained in:
parent
3907de0289
commit
10098b5c71
|
@ -5,9 +5,9 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2010 Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
|
||||
* Copyright (C) 1992-2015 Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
|
||||
* Copyright (C) 2010 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 1992-2010 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 1992-2015 KiCad Developers, see change_log.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -156,13 +156,13 @@ private:
|
|||
int m_ivalue; // the integer value, for PUSHPARM type item
|
||||
|
||||
public:
|
||||
AM_PARAM_ITEM( parm_item_type aType = NOP, double aValue = 0.0)
|
||||
AM_PARAM_ITEM( parm_item_type aType, double aValue )
|
||||
{
|
||||
m_type = aType;
|
||||
m_dvalue = aValue;
|
||||
m_ivalue = 0;
|
||||
}
|
||||
AM_PARAM_ITEM( parm_item_type aType = NOP, int aValue = 0)
|
||||
AM_PARAM_ITEM( parm_item_type aType, int aValue )
|
||||
{
|
||||
m_type = aType;
|
||||
m_dvalue = 0.0;
|
||||
|
|
|
@ -331,7 +331,7 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule,
|
|||
if( dlength < drill )
|
||||
{
|
||||
std::swap( drill, dlength );
|
||||
angle += M_PI2;
|
||||
angle += M_PI_2;
|
||||
}
|
||||
|
||||
// NOTE: KiCad measures a slot's length from end to end
|
||||
|
|
|
@ -1137,9 +1137,9 @@ void IDF_SEGMENT::CalcCenterAndRadius( void )
|
|||
double h = sqrt( dh2 );
|
||||
|
||||
if( angle > 0.0 )
|
||||
offAng += M_PI2;
|
||||
offAng += M_PI_2;
|
||||
else
|
||||
offAng -= M_PI2;
|
||||
offAng -= M_PI_2;
|
||||
|
||||
if( ( angle > 180.0 ) || ( angle < -180.0 ) )
|
||||
offAng += M_PI;
|
||||
|
|
|
@ -32,18 +32,7 @@
|
|||
#include <fstream>
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.1415926535897932384626433832795028841
|
||||
#endif
|
||||
|
||||
#ifndef M_PI2
|
||||
#define M_PI2 ( M_PI / 2.0 )
|
||||
#endif
|
||||
|
||||
#ifndef M_PI4
|
||||
#define M_PI4 ( M_PI / 4.0 )
|
||||
#endif
|
||||
#include <cmath>
|
||||
|
||||
// differences in angle smaller than MIN_ANG are considered equal
|
||||
#define MIN_ANG (0.01)
|
||||
|
|
|
@ -3522,7 +3522,7 @@ bool IDF3_BOARD::AddSlot( double aWidth, double aLength, double aOrientation, do
|
|||
}
|
||||
|
||||
double a1 = aOrientation / 180.0 * M_PI;
|
||||
double a2 = a1 + M_PI2;
|
||||
double a2 = a1 + M_PI_2;
|
||||
double d1 = aLength / 2.0;
|
||||
double d2 = aWidth / 2.0;
|
||||
double sa1 = sin( a1 );
|
||||
|
|
Loading…
Reference in New Issue