Java Code Examples for net.minecraft.util.MathHelper.func_181758_c()

The following are Jave code examples for showing how to use func_181758_c() of the net.minecraft.util.MathHelper class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: BaseClient   File: BiomeGenBase.java   Source Code and License Vote up 5 votes
/**
 * takes temperature, returns color
 */
public int getSkyColorByTemp(float p_76731_1_)
{
    p_76731_1_ = p_76731_1_ / 3.0F;
    p_76731_1_ = MathHelper.clamp_float(p_76731_1_, -1.0F, 1.0F);
    return MathHelper.func_181758_c(0.62222224F - p_76731_1_ * 0.05F, 0.5F + p_76731_1_ * 0.1F, 1.0F);
}
 
Example 2
Project: BaseClient   File: BiomeGenBase.java   Source Code and License Vote up 5 votes
/**
 * takes temperature, returns color
 */
public int getSkyColorByTemp(float p_76731_1_)
{
    p_76731_1_ = p_76731_1_ / 3.0F;
    p_76731_1_ = MathHelper.clamp_float(p_76731_1_, -1.0F, 1.0F);
    return MathHelper.func_181758_c(0.62222224F - p_76731_1_ * 0.05F, 0.5F + p_76731_1_ * 0.1F, 1.0F);
}