20 lines
497 B
JavaScript
Executable File
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;
|
|
} |