mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
5 lines
201 B
TypeScript
5 lines
201 B
TypeScript
export default function (amount: number, from: Date, to: Date): number {
|
|
const decayDuration = (to.getTime() - from.getTime()) / 1000
|
|
return amount * Math.pow(0.99999997802044727, decayDuration)
|
|
}
|