Open GrimgarD2 opened 2 months ago
I wanted to use an all black image to split on the removal of a UI element, but it kept breaking
After some investigation its due to a divide by zero issue in the color check function within the Destiny 2 AutoSplitter.ahk file
Destiny 2 AutoSplitter.ahk
specifically lines 776-780: pCorrect := Round((((bCorrect/makeBlack) + (wCorrect/makeWhite))/2), 2) PercCorrectForGui := Round((pCorrect100), 0) WhiteCorrectForGui := Round((wCorrect/makeWhite100), 0) BlackCorrectForGui := Round((bCorrect/makeBlack*100), 0) return pCorrect
in my use case makeWhite := 0 as there are no white pixels therefore wCorrect/makeWhite results in a divide by zero error
wCorrect/makeWhite
I wanted to use an all black image to split on the removal of a UI element, but it kept breaking
After some investigation its due to a divide by zero issue in the color check function within the
Destiny 2 AutoSplitter.ahk
filespecifically lines 776-780: pCorrect := Round((((bCorrect/makeBlack) + (wCorrect/makeWhite))/2), 2) PercCorrectForGui := Round((pCorrect100), 0) WhiteCorrectForGui := Round((wCorrect/makeWhite100), 0) BlackCorrectForGui := Round((bCorrect/makeBlack*100), 0) return pCorrect
in my use case makeWhite := 0 as there are no white pixels therefore
wCorrect/makeWhite
results in a divide by zero error