pkg.re/essentialkaos/ek.10@v12.41.0+incompatible/easing/linear.go (about)

     1  package easing
     2  
     3  // ////////////////////////////////////////////////////////////////////////////////// //
     4  //                                                                                    //
     5  //                         Copyright (c) 2022 ESSENTIAL KAOS                          //
     6  //      Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0>     //
     7  //                                                                                    //
     8  // ////////////////////////////////////////////////////////////////////////////////// //
     9  
    10  // Linear no easing and no acceleration
    11  func Linear(t, b, c, d float64) float64 {
    12  	if t > d {
    13  		return c
    14  	}
    15  
    16  	return c*t/d + b
    17  }