变量 "k" 代表什么?
What does the variable "k" stand for?
我使用 tween.js library,它包含一些内置的缓动函数,例如这个:
Quadratic: {
In: function (k) {
return k * k;
}
};
user guide 将变量 k
描述为:
k
:缓和进度,或者我们在补间期间的持续时间。允许的值在 [0, 1]. 范围内
我的问题是为什么k
,这个字母代表什么?如果我自己写这个函数,我会把它命名为p
表示进度或百分比。
这篇关于数学命名约定的维基百科文章 (https://en.m.wikipedia.org/wiki/Latin_letters_used_in_mathematics) 告诉我们小写的 k 代表:
• the unit prefix kilo- (10³)
• the Boltzmann constant, this is often represented as kB to avoid confusion with
•the Wavenumber of the wave equation
•an integer, e.g. a dummy variable in summations, or an index of a matrix.
•an unspecified (real) constant
•the spring constant of Hooke's law
•the spacetime Curvature from the Friedmann equations in cosmology
在这种情况下,我建议第四项是对 k
最恰当的描述。
an integer, e.g. a dummy variable in summations, or an index of a matrix.
如果作者有理由将变量命名为 k
,也许就是这样。如果是这样,那么 'k' 就没有 'stand for' 任何东西,而只是数学书呆子使用的约定 ;)
好吧,我写了代码(经典的 Penner 缓动方程的经典简化),老实说,我不记得我为什么选择 k
。
它曾经是我的默认变量名称,用于 0 和 1 之间的比率。我想不出什么好的理由。
我使用 tween.js library,它包含一些内置的缓动函数,例如这个:
Quadratic: {
In: function (k) {
return k * k;
}
};
user guide 将变量 k
描述为:
k
:缓和进度,或者我们在补间期间的持续时间。允许的值在 [0, 1]. 范围内
我的问题是为什么k
,这个字母代表什么?如果我自己写这个函数,我会把它命名为p
表示进度或百分比。
这篇关于数学命名约定的维基百科文章 (https://en.m.wikipedia.org/wiki/Latin_letters_used_in_mathematics) 告诉我们小写的 k 代表:
• the unit prefix kilo- (10³)
• the Boltzmann constant, this is often represented as kB to avoid confusion with
•the Wavenumber of the wave equation
•an integer, e.g. a dummy variable in summations, or an index of a matrix.
•an unspecified (real) constant
•the spring constant of Hooke's law
•the spacetime Curvature from the Friedmann equations in cosmology
在这种情况下,我建议第四项是对 k
最恰当的描述。
an integer, e.g. a dummy variable in summations, or an index of a matrix.
如果作者有理由将变量命名为 k
,也许就是这样。如果是这样,那么 'k' 就没有 'stand for' 任何东西,而只是数学书呆子使用的约定 ;)
好吧,我写了代码(经典的 Penner 缓动方程的经典简化),老实说,我不记得我为什么选择 k
。
它曾经是我的默认变量名称,用于 0 和 1 之间的比率。我想不出什么好的理由。