Files
discord-decomp/sources/by-id/module-06483.jsx
T
2026-07-27 16:20:00 +03:00

28 lines
1.5 KiB
React

/* Metro module 6483; source: unknown; dependencies: [6374, 6375] */
function _fun51051(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6661:6, offset: 0x01227c56, size: 93 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6374) /* metro dependency 6374 */;
const env0_1 = importDefault(6375) /* metro dependency 6375 */;
exports.AverageWindow = _fun51052();
}
function _fun51052() { // fn#51052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6661:118, offset: 0x01227cb3, size: 101 bytes, params: 1, frame: 15
return env0_1(AverageWindow_51053, [{key: 'currentValue', get: function() {
return this.currentAverage;
}}, {key: 'addValue', value: function(a0) {
var r1;
var value = this.getNextIndex();
var property = this.inputValues[value];
r1 = property === undefined ? this.currentCount + 1 : this.currentCount;
this.inputValues[value] = a0;
this.currentAverage = this.currentAverage * (this.currentCount / r1) + (a0 - (property ?? 0)) / r1;
this.currentCount = r1;
}}, {key: 'getNextIndex', value: function() {
var nextIndex = this.nextIndex;
this.nextIndex = (this.nextIndex + 1) % this.inputValues.length;
return nextIndex;
}}]);
}