Added 1B, 2 and added bootstrap again for site
This commit is contained in:
parent
b8995b3a1b
commit
d1ce485572
37 changed files with 1842 additions and 89 deletions
17
src/domain/calculations/circuit-power-calculation.ts
Normal file
17
src/domain/calculations/circuit-power-calculation.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
export function calculateRowTotalPower(
|
||||
quantity: number,
|
||||
powerPerUnit: number,
|
||||
simultaneityFactor: number
|
||||
): number {
|
||||
return quantity * powerPerUnit * simultaneityFactor;
|
||||
}
|
||||
|
||||
export function calculateCircuitTotalPower(
|
||||
rows: Array<{ quantity: number; powerPerUnit: number; simultaneityFactor: number }>
|
||||
): number {
|
||||
return rows.reduce(
|
||||
(sum, row) => sum + calculateRowTotalPower(row.quantity, row.powerPerUnit, row.simultaneityFactor),
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue