mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 00:07:51 +00:00
17 lines
450 B
JavaScript
17 lines
450 B
JavaScript
.pragma library
|
|
|
|
function mapScope (inputScopeFrom, inputScopeTo, outputScopeFrom, outputScopeTo, value) {
|
|
var x = (value - inputScopeFrom) / (inputScopeTo - inputScopeFrom);
|
|
var result = outputScopeFrom + ((outputScopeTo - outputScopeFrom) * x);
|
|
return result;
|
|
}
|
|
|
|
|
|
function tr(text) {
|
|
return qsTr(text) + translationManager.emptyString
|
|
}
|
|
|
|
|
|
function lineBreaksToSpaces(text) {
|
|
return text.trim().replace(/(\r\n|\n|\r)/gm, " ");
|
|
}
|