* Divide this duration by a scalar.
(scalar: number)
| 1381 | * Divide this duration by a scalar. |
| 1382 | */ |
| 1383 | public divide(scalar: number): DurationValue { |
| 1384 | if (scalar === 0) return new DurationValue(0, 0, 0, 0); |
| 1385 | return new DurationValue( |
| 1386 | Math.trunc(this.#months / scalar), |
| 1387 | Math.trunc(this.#days / scalar), |
| 1388 | Math.trunc(this.#seconds / scalar), |
| 1389 | Math.trunc(this.#nanoseconds / scalar), |
| 1390 | ); |
| 1391 | } |
| 1392 | |
| 1393 | /** |
| 1394 | * Negate this duration. |
no outgoing calls
no test coverage detected