summaryrefslogtreecommitdiffstats
path: root/generic/tkFont.h
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-01-05 19:06:09 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-01-05 19:06:09 (GMT)
commit0fba977b7b80efcefd747101ba1308a67eb54aab (patch)
tree11b31e82dac73a049160a61f1203347a4efd487c /generic/tkFont.h
parent9e471eb7e462d3f7acd8bb020b94999ae4ecff05 (diff)
downloadtk-0fba977b7b80efcefd747101ba1308a67eb54aab.zip
tk-0fba977b7b80efcefd747101ba1308a67eb54aab.tar.gz
tk-0fba977b7b80efcefd747101ba1308a67eb54aab.tar.bz2
Win doesn't have round(), but does have floor()
Diffstat (limited to 'generic/tkFont.h')
-rw-r--r--generic/tkFont.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tkFont.h b/generic/tkFont.h
index ebf5bca..be862f3 100644
--- a/generic/tkFont.h
+++ b/generic/tkFont.h
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkFont.h,v 1.14 2010/01/05 08:49:49 dkf Exp $
+ * RCS: @(#) $Id: tkFont.h,v 1.15 2010/01/05 19:06:09 dkf Exp $
*/
#ifndef _TKFONT
@@ -192,7 +192,7 @@ typedef struct TkXLFDAttributes {
* Helper macro. How to correctly round a double to a short.
*/
-#define ROUND16(x) ((short) round(x))
+#define ROUND16(x) ((short) floor((x) + 0.5))
/*
* Low-level API exported by generic code to platform-specific code.