mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
apparently I'm fucking dumb
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user