这里10其实是多项式最高可能的次数,我们可以用 引入常量(Introduce Constant) 这一重构手段将魔法数转换为清晰的常数。在10出现的地方选择智能标记的“Introduce Constant”菜单,Refactor!
基于33个网页-相关网页
Introduce constant k 引入常数k
You can also use import to introduce other non-constant members as well. For example, consider a math utility library (of questionable value perhaps, but still...) in Listing 6.
也可以使用import来引入其他非常量的成员。
RubyMine 2.0 adds several new refactorings, such as Extract Module/Superclass, Introduce Variable/Constant/Field, Inline Variable and Pull Up/Push Down Members.
RubyMine 2.0加入了一些新的重构,例如抽取模块/超类,引入变量/常数/Field,内联变量以及取出/放入成员。
Introduce MAXIM's fiber optic device and surround analog device be use to optical module. There are several ways to keep laser temperature constant to avoid wavelength shift.
介绍MAXIM的光器件和用于光模块的周边模拟器件,以及保证激光二极管温度恒定以防止波长偏移的几种方法。
应用推荐