• Travis Cross's avatar
    Fix mod_expr `clamp` function · 65e678ba
    Travis Cross 提交于
    The clamp(v,a,b) function wraps v around the interval [a,b).
    
    However prior to this commit, `clamp` was ignoring the third argument
    and using the second argument again in its place.  This resulted in a
    division by zero.  Hence `clamp` didn't work at all.
    
    Even if the arguments were treated correctly, `clamp` incorrectly
    multiplied rather than added whenever v < a.  This would have produced
    bogus results.  (Thanks to Shona McNeill for pointing this out.)
    
    Note that as implemented, `clamp` is undefined for b >= a.
    
    These errors are present in the last upstream C version, v2.7.
    They've been corrected in the C++ version that upstream now maintains
    instead.
    
    Thanks-to: Shona McNeill <prufrax@googlemail.com>
    
    FS-7070 #resolve
    65e678ba
名称
最后提交
最后更新
..
Makefile.am 正在载入提交数据...
conio.h 正在载入提交数据...
exprconf.h 正在载入提交数据...
expreval.c 正在载入提交数据...
expreval.h 正在载入提交数据...
expreval.html 正在载入提交数据...
exprfunc.c 正在载入提交数据...
exprilfs.h 正在载入提交数据...
exprincl.h 正在载入提交数据...
exprinit.c 正在载入提交数据...
exprmem.c 正在载入提交数据...
exprmem.h 正在载入提交数据...
exprobj.c 正在载入提交数据...
exprpars.c 正在载入提交数据...
exprpriv.h 正在载入提交数据...
exprtmpl.html 正在载入提交数据...
exprutil.c 正在载入提交数据...
exprval.c 正在载入提交数据...
license.txt 正在载入提交数据...
mod_expr.2008.vcproj 正在载入提交数据...
mod_expr.2010.vcxproj 正在载入提交数据...
mod_expr.2012.vcxproj 正在载入提交数据...
mod_expr.c 正在载入提交数据...
mod_expr.vcproj 正在载入提交数据...
readme.txt 正在载入提交数据...