需要帮助命名一个代表值及其线性变化的类
在进行一些重构时,我发现我经常使用一对或浮点数来表示初始值以及该值随时间线性变化的程度。 我想创建一个结构来保存这两个字段,但我找不到它的正确名称。
它应该看起来像这样:
struct XXX
{
float Value;
float Slope; // or Delta? or Variation?
}
任何建议将不胜感激。
While doing some refactoring I've found that I'm quite often using a pair or floats to represent an initial value and how much this value linearly varies over time. I want to create a struct to hold both fields but I just can't find the right name for it.
It should look something like this:
struct XXX
{
float Value;
float Slope; // or Delta? or Variation?
}
Any suggestions will be much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
由于您有一个初始值和一个指示“某物”如何演变的值,因此您可以选择“线性函数”之类的值。
我还会添加必要的成员函数:
或者我是否渴望在这里?
Since you have an initial value, and a value indicating how 'something' evolves, you could go with something like "Linear Function".
I would also add the necessary member functions:
Or am I to eager here?
我想我更喜欢这种命名:
I guess i would prefer this kind of naming:
初始值+常数斜率:这不是仿射函数吗?
Initial value + constant slope : isn't this an affine function ?
对我来说感觉就像一个“秤”......
或者也许
Feels like a "Scale" to me...
or maybe
就像算术级数(或算术序列)
或
It's like Arithmetic progression (or arithmetic sequence)
or