mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
fix: calculation spelling
This commit is contained in:
@@ -6,14 +6,14 @@ export class HeavyCalculationService {
|
|||||||
private loadingLength = signal(0);
|
private loadingLength = signal(0);
|
||||||
|
|
||||||
loadingPercentage = computed(
|
loadingPercentage = computed(
|
||||||
() => (this.loadingLength() * 100) / this.finalLength
|
() => (this.loadingLength() * 100) / this.finalLength,
|
||||||
);
|
);
|
||||||
|
|
||||||
startLoading() {
|
startLoading() {
|
||||||
this.randomHeavyCalculalationFunction();
|
this.randomHeavyCalculationFunction();
|
||||||
}
|
}
|
||||||
|
|
||||||
private randomHeavyCalculalationFunction() {
|
private randomHeavyCalculationFunction() {
|
||||||
for (let num = 2; num <= 10000000; num++) {
|
for (let num = 2; num <= 10000000; num++) {
|
||||||
let randomFlag = true;
|
let randomFlag = true;
|
||||||
for (let i = 2; i <= Math.sqrt(num); i++) {
|
for (let i = 2; i <= Math.sqrt(num); i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user