Package crazypants.vecmath

Examples of crazypants.vecmath.Vector4f.interpolate()


    double ratio = dispDamage / maxDam;
    Vector4f fg = ColorUtil.toFloat(full);
    Vector4f ec = ColorUtil.toFloat(empty);
    fg.interpolate(ec, (float) ratio);
    Vector4f bg = ColorUtil.toFloat(Color.black);
    bg.interpolate(fg, 0.15f);
   
    int barLength = (int) Math.round(12.0 * (1 - ratio));   
   
    RenderUtil.renderQuad2D(2, y, 0, 12, 1, bg);
    RenderUtil.renderQuad2D(2, y, 0, barLength, 1, fg);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.