Files
qt5-legatus-legacy/Lts/Tools/TrackingTool/Helpers.js
T
2026-08-13 18:33:10 +02:00

20 lines
497 B
JavaScript
Executable File

export function degToRad (deg) {
return (deg / 180 * Math.PI);
}
export function radToDeg (rad) {
return (rad /Math.PI * 180);
}
//Funktion addiert 'color'-Wert aus PartyBaseData zu 256^3 und gibt gueltigen Hex Color Code zurück.
export function paintIt (color) {
var hex = (16777216 + color).toString(16);
if (hex.toString().length < 6) {
var i = hex.toString().length;
for (i; i < 6; i++) {
hex = "0" + hex;
}
}
return "#" + hex;
}