diff options
author | San Jacobs | 2023-10-15 15:44:43 +0200 |
---|---|---|
committer | San Jacobs | 2023-10-15 15:44:43 +0200 |
commit | ce29f3a14900b7ec3e4916af7956dfe5baf3aaf0 (patch) | |
tree | 58e9673b729421b8781c1d7eebc4ce8292097a5e /src/time.odin | |
parent | 871436abc5a0a27bc9e70204edf19b27bfefab45 (diff) | |
download | satscalc-ce29f3a14900b7ec3e4916af7956dfe5baf3aaf0.tar.gz satscalc-ce29f3a14900b7ec3e4916af7956dfe5baf3aaf0.tar.bz2 satscalc-ce29f3a14900b7ec3e4916af7956dfe5baf3aaf0.zip |
Calculating and displaying real prices
Diffstat (limited to 'src/time.odin')
-rw-r--r-- | src/time.odin | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/time.odin b/src/time.odin index 90dca49..712136d 100644 --- a/src/time.odin +++ b/src/time.odin @@ -68,6 +68,7 @@ Workday :: struct { // timeblock's start and end fractions : [16]Fractionpair, total_timeblocks : int, + price: f32, } @@ -193,6 +194,7 @@ new_workday :: proc(previous_wrap : Moment, for each_block, i in blocks { fmt.printf("Block %2i: %s $f: %i%% %s\n", i+1, toString(each_block), int((each_block.value-1)*100), each_block.reason) + price += f32(f64(dayrate/7.5) * f64(hourcount(each_block)) * f64(each_block.value)) } return |