mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 14:03:23 -07:00
commit
e9ab99c5ac
1 changed files with 2 additions and 2 deletions
|
@ -578,7 +578,7 @@ namespace GreenshotPlugin.Core {
|
||||||
|
|
||||||
// the cube cannot be cut at bottom (this would lead to empty cube)
|
// the cube cannot be cut at bottom (this would lead to empty cube)
|
||||||
if (halfWeight != 0) {
|
if (halfWeight != 0) {
|
||||||
Single halfDistance = halfRed * halfRed + halfGreen * halfGreen + halfBlue * halfBlue;
|
Single halfDistance = (Single)halfRed * halfRed + (Single)halfGreen * halfGreen + (Single)halfBlue * halfBlue;
|
||||||
Single temp = halfDistance / halfWeight;
|
Single temp = halfDistance / halfWeight;
|
||||||
|
|
||||||
halfRed = wholeRed - halfRed;
|
halfRed = wholeRed - halfRed;
|
||||||
|
@ -587,7 +587,7 @@ namespace GreenshotPlugin.Core {
|
||||||
halfWeight = wholeWeight - halfWeight;
|
halfWeight = wholeWeight - halfWeight;
|
||||||
|
|
||||||
if (halfWeight != 0) {
|
if (halfWeight != 0) {
|
||||||
halfDistance = halfRed * halfRed + halfGreen * halfGreen + halfBlue * halfBlue;
|
halfDistance = (Single)halfRed * halfRed + (Single)halfGreen * halfGreen + (Single)halfBlue * halfBlue;
|
||||||
temp += halfDistance / halfWeight;
|
temp += halfDistance / halfWeight;
|
||||||
|
|
||||||
if (temp > result) {
|
if (temp > result) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue