fix power distillation projecting incorrectly
This commit is contained in:
parent
9561391995
commit
6e630b35d7
1 changed files with 2 additions and 2 deletions
|
@ -37,9 +37,9 @@ object OpPowProj : ConstManaOperator {
|
|||
Vec3(lvec.x.pow(rnum), lvec.y.pow(rnum), lvec.z.pow(rnum))
|
||||
},
|
||||
{ rvec ->
|
||||
if (rvec == Vec3.ZERO)
|
||||
if (lvec == Vec3.ZERO)
|
||||
throw MishapDivideByZero.of(lvec, rvec, "project")
|
||||
rvec.scale(lvec.dot(rvec) / rvec.dot(rvec))
|
||||
rvec.scale(rvec.dot(lvec) / lvec.dot(lvec))
|
||||
}
|
||||
)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue