Pixel-Composer/scripts/d3d_bbox/d3d_bbox.gml

22 lines
400 B
Text
Raw Normal View History

function __bbox3D(first, second) constructor {
self.first = first;
self.second = second;
static getScale = function() {
2023-11-08 08:38:04 +01:00
INLINE
return sqrt(
sqr(first.x - second.x) +
sqr(first.y - second.y) +
sqr(first.z - second.z)
);
}
static getMaximumScale = function() {
2023-11-08 08:38:04 +01:00
INLINE
return max(
abs(first.x - second.x),
abs(first.y - second.y),
abs(first.z - second.z),
);
}
}