Java interpolate interpolateColor(int a, int b, float w)

Here you can find the source of interpolateColor(int a, int b, float w)

Description

interpolate Color

License

Apache License

Declaration

private static int interpolateColor(int a, int b, float w) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static int interpolateColor(int a, int b, float w) {
        return Math.max(0, Math.min(255, Math.round(a + (b - a) * w)));
    }/*  ww  w .  java2 s .  c  o  m*/
}

Related

  1. interpolateAngle(double oldAngle, double newAngle, double scale)
  2. interpolateAO(float a, float b, float c, float d)
  3. interpolateBrightness(int a, int b, int c, int d)
  4. interpolateClamp(final double position, final double startPosition, final double endPosition, final double startValue, final double endValue)
  5. interpolateColor(double x, double y, int c0, int c1, int c2, int c3)
  6. interpolateColor(int c1, int c2, int st, int sts)
  7. interpolateColor(int rgba1, int rgba2, float percent)
  8. interpolateColors(int a, int b, float lerp)
  9. interpolateColors(int c0, int c1, float w)