算法还是有点小tricky的.

来源: 2017-09-03 20:40:57 [博客] [旧帖] [给我悄悄话] 本文已被阅读:

算楼梯的时候, 按CODE和下面的公式代入.

Riser Height = total rise / number of risers

total run = run x number of treads + thinkness of top riser + bottom nosing

注意, number of treads, one less than number of risers 

因为CODE会要求每个台阶的rise/run的最小长度, rise/run的difference在一定范围内, 比如3/8或.3/16... 同时total run/total rise周围情况也可能限制了你的total run/total rise, 所以, 最后的台阶数, rise, run要测试几遍, 找到最适合每家的情况.