make maxval work better near p8 precision limits
This commit is contained in:
parent
33fede4ed8
commit
175099d778
@ -423,9 +423,13 @@ end
|
|||||||
|
|
||||||
function vertmeter(x0,y0,x1,y1,val,maxval,cols)
|
function vertmeter(x0,y0,x1,y1,val,maxval,cols)
|
||||||
if ((val <= 0) or (maxval <= 0)) return
|
if ((val <= 0) or (maxval <= 0)) return
|
||||||
|
if val < 0x0.001 or maxval < 0x0.001 then
|
||||||
|
val *= 16
|
||||||
|
maxval *= 16
|
||||||
|
end
|
||||||
val=min(val, maxval)
|
val=min(val, maxval)
|
||||||
local h = y1-y0
|
local h = y1-y0
|
||||||
local px = val/maxval * h \ 1
|
local px = val*h/maxval \ 1
|
||||||
local ncols = #cols
|
local ncols = #cols
|
||||||
local firstcol = ((h-px)*ncols\h)+1
|
local firstcol = ((h-px)*ncols\h)+1
|
||||||
local lastbottom = y0+(h*firstcol\ncols)
|
local lastbottom = y0+(h*firstcol\ncols)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user