blob: b9179c0a9102d7027bb73c7f6983b7d9ba202c8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2011 Blender Foundation. */
#include "COM_ChunkOrderHotspot.h"
#include <cmath>
namespace blender::compositor {
double ChunkOrderHotspot::calc_distance(int x, int y)
{
int dx = this->x - x;
int dy = this->y - y;
double result = sqrt((double)(dx * dx + dy * dy));
result += (double)this->addition;
return result;
}
} // namespace blender::compositor
|