7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-11 12:30:14 +00:00

Use the C++ isnan function

This commit is contained in:
Marek Roszko 2020-11-29 11:29:58 -05:00
parent 889408c96a
commit 9322b3a4e1

View File

@ -35,7 +35,7 @@
#include <trigo.h>
#include <macros.h>
#include <math.h>
#include <cmath> // isnan
#include <board.h>
#include "common.h"
@ -564,9 +564,9 @@ void DXF_IMPORT_PLUGIN::addText( const DL_TextData& aData )
{
DXF_ARBITRARY_AXIS arbAxis = getArbitraryAxis( getExtrusion() );
VECTOR3D refPointCoords = ocsToWcs( arbAxis, VECTOR3D( aData.ipx, aData.ipy, aData.ipz ) );
VECTOR3D secPointCoords = ocsToWcs( arbAxis, VECTOR3D( isnan( aData.apx ) ? 0 : aData.apx,
isnan( aData.apy ) ? 0 : aData.apy,
isnan( aData.apz ) ? 0 : aData.apz ) );
VECTOR3D secPointCoords = ocsToWcs( arbAxis, VECTOR3D( std::isnan( aData.apx ) ? 0 : aData.apx,
std::isnan( aData.apy ) ? 0 : aData.apy,
std::isnan( aData.apz ) ? 0 : aData.apz ) );
VECTOR2D refPoint( mapX( refPointCoords.x ), mapY( refPointCoords.y ) );
VECTOR2D secPoint( mapX( secPointCoords.x ), mapY( secPointCoords.y ) );