- we have nearbyintf() in libm now

This commit is contained in:
jasper 2011-04-28 18:38:40 +00:00
parent 372a7d3edf
commit 8f29c06fe1
4 changed files with 4 additions and 65 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.18 2010/11/21 09:33:27 landry Exp $
# $OpenBSD: Makefile,v 1.19 2011/04/28 18:39:20 jasper Exp $
COMMENT= garmin gps map management tool
DISTNAME= QLandkarte_final
PKGNAME= qlandkarte-0.7.4
REVISION= 0
REVISION= 1
CATEGORIES= geo x11

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-src_CToolViewLog_cpp,v 1.3 2008/07/07 17:39:24 pvalchev Exp $
--- src/CToolViewLog.cpp.orig Wed Jun 4 11:36:19 2008
+++ src/CToolViewLog.cpp Mon Jul 7 09:49:36 2008
@@ -111,7 +111,9 @@ void CToolViewLog::slotPosition(const CGarminLiveLog::
lblErrorHoriz->setText(QString("\261%1m").arg(pvt.eph/2,0,'f',0));
lblErrorVert->setText(QString("\261%1m").arg(pvt.epv/2,0,'f',0));
lblSpeed->setText(QString("%1km/h").arg(speed_km_h, 0, 'f', 1));
- lblHeading->setText(QString("%1\260T").arg(nearbyintf(heading),3,'f',0,'0'));
+ // XXX this is a bad hack
+ //lblHeading->setText(QString("%1\260T").arg(nearbyintf(heading),3,'f',0,'0'));
+ lblHeading->setText(QString("%1\260T").arg((int)heading+0.5,3,'f',0,'0'));
lblTime->setText(t.toString());
}
else {

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.31 2010/11/19 22:28:08 espie Exp $
# $OpenBSD: Makefile,v 1.32 2011/04/28 18:38:40 jasper Exp $
COMMENT= free video editor
@ -6,7 +6,7 @@ V= 2.4.4
DISTNAME= avidemux_${V}
PKGNAME= avidemux-${V}
REVISION= 6
REVISION= 7
CATEGORIES= multimedia

View File

@ -1,47 +0,0 @@
$OpenBSD: patch-avidemux_ADM_videoFilter_ADM_vidParticle_cpp,v 1.1 2008/03/19 09:21:37 ajacoutot Exp $
--- avidemux/ADM_videoFilter/ADM_vidParticle.cpp.orig Sun Feb 3 13:04:10 2008
+++ avidemux/ADM_videoFilter/ADM_vidParticle.cpp Mon Feb 18 10:50:21 2008
@@ -797,8 +797,8 @@ uint8_t ImageTool::autoOutline (uint32_t x, uint32_t y
if (my_outImage)
{
- uint32_t px = static_cast <uint32_t> (nearbyintf (my_particle.centroidX));
- uint32_t py = static_cast <uint32_t> (nearbyintf (my_particle.centroidY));
+ uint32_t px = static_cast <uint32_t> (rint (my_particle.centroidX));
+ uint32_t py = static_cast <uint32_t> (rint (my_particle.centroidY));
if (validPixel (px, py))
outPixel (px, py) = 255;
else
@@ -1157,8 +1157,8 @@ static inline
char & pixel_char (vector <string> & grid, int16_t xbase, int16_t ybase,
float cX, float cY, float dX, float dY)
{
- uint16_t x = static_cast <uint16_t> (nearbyintf (cX + dX));
- uint16_t y = static_cast <uint16_t> (nearbyintf (cY + dY));
+ uint16_t x = static_cast <uint16_t> (rint (cX + dX));
+ uint16_t y = static_cast <uint16_t> (rint (cY + dY));
return grid [y - ybase][x - xbase];
}
@@ -1319,8 +1319,8 @@ void ImageTool::showStuff (ShowStuff what) const
++plit;
}
- uint32_t px = static_cast <uint32_t> (nearbyintf (my_particle.centroidX));
- uint32_t py = static_cast <uint32_t> (nearbyintf (my_particle.centroidY));
+ uint32_t px = static_cast <uint32_t> (rint (my_particle.centroidX));
+ uint32_t py = static_cast <uint32_t> (rint (my_particle.centroidY));
char & ch = grid [py - ybase][px - xbase];
if (ch == 'x')
ch = 'X';
@@ -1353,8 +1353,8 @@ void ImageTool::showStuff (ShowStuff what) const
}
}
}
- uint32_t px = static_cast <uint32_t> (nearbyintf (my_particle.centroidX));
- uint32_t py = static_cast <uint32_t> (nearbyintf (my_particle.centroidY));
+ uint32_t px = static_cast <uint32_t> (rint (my_particle.centroidX));
+ uint32_t py = static_cast <uint32_t> (rint (my_particle.centroidY));
char & ch = grid [py - ybase][px - xbase];
if (ch == '.')
ch = '*';