Bring back linear interpolation of rgbacolor
This commit is contained in:
parent
e7c0a30d2d
commit
292d81af98
@ -4,7 +4,7 @@ kotlin.code.style=official
|
|||||||
specifyKotlinAsDependency=false
|
specifyKotlinAsDependency=false
|
||||||
|
|
||||||
projectGroup=ru.dbotthepony.kommons
|
projectGroup=ru.dbotthepony.kommons
|
||||||
projectVersion=1.7.1
|
projectVersion=1.7.2
|
||||||
|
|
||||||
guavaDepVersion=33.0.0
|
guavaDepVersion=33.0.0
|
||||||
gsonDepVersion=2.8.9
|
gsonDepVersion=2.8.9
|
||||||
|
@ -150,14 +150,14 @@ class RGBAColor(red: Float, green: Float, blue: Float, alpha: Float = 1f) : IStr
|
|||||||
return red.hashCode() + green.hashCode() * 31 + blue.hashCode() * 31 * 31 + alpha.hashCode() * 31 * 31 * 31
|
return red.hashCode() + green.hashCode() * 31 + blue.hashCode() * 31 * 31 + alpha.hashCode() * 31 * 31 * 31
|
||||||
}
|
}
|
||||||
|
|
||||||
/*fun linearInterpolation(t: Float, other: RGBAColor, interpolateAlpha: Boolean = true): RGBAColor {
|
fun linearInterpolation(t: Float, other: RGBAColor, interpolateAlpha: Boolean = true): RGBAColor {
|
||||||
return RGBAColor(
|
return RGBAColor(
|
||||||
linearInterpolation(t, red, other.red),
|
linearInterpolation(t, red, other.red),
|
||||||
linearInterpolation(t, green, other.green),
|
linearInterpolation(t, green, other.green),
|
||||||
linearInterpolation(t, blue, other.blue),
|
linearInterpolation(t, blue, other.blue),
|
||||||
if (interpolateAlpha) linearInterpolation(t, alpha, other.alpha) else alpha,
|
if (interpolateAlpha) linearInterpolation(t, alpha, other.alpha) else alpha,
|
||||||
)
|
)
|
||||||
}*/
|
}
|
||||||
|
|
||||||
operator fun times(other: RGBAColor): RGBAColor {
|
operator fun times(other: RGBAColor): RGBAColor {
|
||||||
if (isWhite)
|
if (isWhite)
|
||||||
|
Loading…
Reference in New Issue
Block a user