mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-15 06:53:59 +01:00
23 lines
401 B
Plaintext
23 lines
401 B
Plaintext
function __bbox3D(first, second) constructor {
|
|
self.first = first;
|
|
self.second = second;
|
|
|
|
static getScale = function() {
|
|
INLINE
|
|
return sqrt(
|
|
sqr(first.x - second.x) +
|
|
sqr(first.y - second.y) +
|
|
sqr(first.z - second.z)
|
|
);
|
|
}
|
|
|
|
static getMaximumScale = function() {
|
|
INLINE
|
|
return max(
|
|
abs(first.x - second.x),
|
|
abs(first.y - second.y),
|
|
abs(first.z - second.z),
|
|
);
|
|
}
|
|
}
|