apparently I'm fucking dumb

This commit is contained in:
minjaesong
2019-06-07 10:37:04 +09:00
parent 9445c615e6
commit 25fd843ef2

View File

@@ -699,12 +699,12 @@ object LightmapRenderer {
/** infix is removed to clarify the association direction */ /** infix is removed to clarify the association direction */
fun Cvec.maxAndAssign(other: Cvec): Cvec { fun Cvec.maxAndAssign(other: Cvec): Cvec {
this.set( // TODO investigate: if I use assignment instead of set(), it blackens like the vector branch // TODO investigate: if I use assignment instead of set(), it blackens like the vector branch. --Torvald, 2019-06-07
if (this.r > other.r) this.r else other.r, // that was because you forgot 'this.r/g/b/a = ' part, bitch. --Torvald, 2019-06-07
if (this.g > other.g) this.g else other.g, this.r = if (this.r > other.r) this.r else other.r
if (this.b > other.b) this.b else other.b, this.g = if (this.g > other.g) this.g else other.g
if (this.a > other.a) this.a else other.a this.b = if (this.b > other.b) this.b else other.b
) this.a = if (this.a > other.a) this.a else other.a
return this return this
} }