R/coolDownLinear.R

Defines functions coolDownLinear

coolDownLinear<-function(start, end, steps, step){
# res <- coolDownLinear(start, end, steps, step)
# divides range from start to end into equally sized steps and returns current value
# INPUT
# start		  start value of linear cooling
# end		  end value of linear cooling
# steps		  number of steps in which the range from start to end should be split
# step		  the current step
# OUTPUT
# cooledDownVal	  value after current step
# author: Florian Lerch
# coolDownLinear(start, end, steps, step)
  start-((start-end)/steps)*(step-1)
}

Try the Umatrix package in your browser

Any scripts or data that you put into this service are public.

Umatrix documentation built on Nov. 25, 2023, 5:08 p.m.