HyCodeYourTale
classpublicPriority 3

Interpolation

com.hypixel.hytale.builtin.hytalegenerator.framework.math.Interpolation

1

Methods

1

Public Methods

0

Fields

1

Constructors

Constructors

public
Interpolation()

Methods

Public Methods (1)

publicstatic
double linear(double valueA, double valueB, double weight)

Source Code

package com.hypixel.hytale.builtin.hytalegenerator.framework.math;

public class Interpolation {
   public Interpolation() {
   }

   public static double linear(double valueA, double valueB, double weight) {
      if (!(weight < 0.0) && !(weight > 1.0)) {
         return valueA * (1.0 - weight) + valueB * weight;
      } else {
         throw new IllegalArgumentException("weight outside range");
      }
   }
}