![]() |
#1 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Rounding when copying ratings columns
When copying a custom #ratings with half-stars to rating (no way to set the tag browser tooltip to a custom column), does it always round down the half-stars?
![]() |
![]() |
![]() |
![]() |
#2 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
½-star books round down to 0 and become undefineds, lol.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Yes, it uses // as the division operator, which returns the floor(). It then adds back the half star if appropriate.
|
![]() |
![]() |
![]() |
#4 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
To fix the ½-star issue:
Code:
program: if $$#ratings ==#'1' then '2' else $$#ratings fi |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
I love using column colours on a ratings column | ownedbycats | Library Management | 17 | 01-19-2022 06:32 PM |
Rounding Word Counts in a Custom Column | eosrose | Library Management | 0 | 05-18-2020 08:44 PM |
My Ratings column | MerlinMama | Calibre | 5 | 09-08-2016 07:20 AM |
Rounding to nearest integer in Custom Column - Hijri Year | oelgamal | Calibre | 2 | 03-28-2013 07:12 PM |
Rounding to nearest integer in Custom Column - Hijri Year | oelgamal | Recipes | 0 | 03-28-2013 02:58 AM |