Home  >  Article  >  Backend Development  >  求一算法!解决办法

求一算法!解决办法

WBOY
WBOYOriginal
2016-06-13 11:33:18789browse

求一算法!!
现有一区间:$start--$end  (例:5--10)。
给一变量$param:
如果$param如果$param>$end  则$param=$end
不用if else,三元 等逻辑算法(虽然简单并且效率也高)
求实现此要求的数学算法

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn