View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000948 | MetaPost | bug | public | 2015-10-13 22:47 | 2017-05-18 13:54 |
Reporter | linus | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Summary | 0000948: mfplain.mp defines a wrong round function | ||||
Description | The last mfplain.mp version that I could find (% $Id: mfplain.mp,v 1.9 2005/04/28 06:45:21 taco Exp $) defines: vardef round primary u = u enddef; vardef hround primary x = x enddef; vardef vround primary y = y enddef; But this should probably be (according to the METAFONTbook): vardef round primary u = if numeric u: floor(u+.5) elseif pair u: (hround xpart u, vround ypart u) else: u fi enddef; vardef hround primary x = floor(x+.5) enddef; vardef vround primary y = floor(y.o_+.5)_o_ enddef; | ||||
Steps To Reproduce | mpost '&mfplain \mode:=localfont; input font' where font.mf contains the following line: message decimal(round(4.2)); This will output 4.2 instead of 4 | ||||
Additional Information | Taco Hoekwater had probably his reasons to do so. Probably one should ask him before changing mfplain.mp. | ||||
Tags | No tags attached. | ||||
|
Thank you very much. I will see asap. |
|
Taco says """ there is no rounding in mp because it is not needed mf rounds because of the bitmap grid at least that was JDH's take on it """ I will leave unmodified these functions, perhaps I cann add MFround etc. |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-10-13 22:47 | linus | New Issue | |
2015-10-15 08:59 | luigi scarso | Note Added: 0001422 | |
2017-05-18 13:54 | luigi scarso | Note Added: 0001673 |