Drahcir Drahcir - 3 months ago 7x
Javascript Question

What does the variable "k" stand for?

I use the tween.js library, it contains some built in easing functions such as this one:

Quadratic: {
In: function (k) {
return k * k;

The user guide describes the variable

  • k
    : the easing progress, or how far along the duration of the tween we are. Allowed values are in the range [0, 1].

My question is why
, what does this letter stand for?
If I'd written the function myself, I'd have named it
meaning either progress or percentage.


Alright, I wrote the code (a classic simplification of the classic Penner easing equations), and honestly I don't remember why I chose k. It used to be my default variable name for a ratio between 0 and 1. No good reason come to my mind.