官方淘宝店 易迪拓培训 旧站入口
首页 > 无线通信 > 通信技术学习讨论 > Re: 把390'角转换成30'角这个动作在数学上学名叫什么?

Re: 把390'角转换成30'角这个动作在数学上学名叫什么?

12-16
wrap

牛人阿,呵呵,这个功能说是取模也不是取模,余数不为0.
类似于取模,略有不同,结果在[1,limit]之间,不会有0。
@wrap(10,3)=1
@wrap(11,3)=2
@wrap(12,3)=3
@wrap(13,3)=1
......
lingo帮助:
@WRAP( INDEX, LIMIT)
This allows you to @wrap an index around the end of a set and continue indexing at the other end of the set. That is, when the last (first) member of a set is reached in a set looping function, use of @WRAP will allow you to wrap the set index to the first (last) member of the set. This is a particularly useful function in cyclical, multiperiod planning models.
Formally speaking, @WRAP returns J such that J = INDEX - K * LIMIT, where K is an integer such that J is in the interval [1,LIMIT]. Informally speaking, @WRAP will subtract or add LIMIT to INDEX until it falls in the range 1to LIMIT.
For an example on the use of the @WRAP function in a staff scheduling model, refer to the Primitive Set Example section in Using Sets.
共勉
多谢  toctory 。

Top