Skip to content

Commit

Permalink
wip but ok
Browse files Browse the repository at this point in the history
  • Loading branch information
faafaa123 committed Nov 2, 2024
1 parent a19907a commit bd82e18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions classes/sun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ export class sun {
this.moonlightDuration = moment.duration(moment(responseData.results.sunrise).diff(this.sunset))
console.log('moon duration')
console.log(this.moonlightDuration)
this.elapsedMoonlight = moment.duration(moment().diff(moment(responseData.results.sunrise)));
this.elapsedMoonlight = moment.duration(moment().diff(moment(this.sunrise)));
console.log('elapsedMoonLight')
console.log(this.elapsedMoonlight)

this.startAtProgress = 1.94 * Math.pow(10, -8) * (this.moonlightDuration.asMilliseconds() - this.elapsedMoonlight.asMilliseconds())
this.startAtProgress = 1 - (1.94 * Math.pow(10, -8) * (this.moonlightDuration.asMilliseconds() - this.elapsedMoonlight.asMilliseconds()) -1)
console.log('this.startAtProgress')
this.startAtProgress = 0.7
// this.startAtProgress = 0.7
console.log(this.startAtProgress)
this.startTime = null;
}).catch(async (error: any) => {
Expand Down

0 comments on commit bd82e18

Please sign in to comment.