X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fcounting.qh;h=0aeabc85e7b092e9800199fd2672c9b475a0a088;hb=7415ded9c665a49be49f4100555dfee6e0bf01b2;hp=1413a80902d1fb338abed1881ea942c2929bf608;hpb=c07a907b93f175325805959e59b844d1c37b80f4;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/counting.qh b/qcsrc/common/counting.qh index 1413a8090..0aeabc85e 100644 --- a/qcsrc/common/counting.qh +++ b/qcsrc/common/counting.qh @@ -60,10 +60,10 @@ string count_ordinal(float interval) // Basically, it just allows you to represent a number or count in different ways // depending on the number... like, with count_ordinal you can provide integers // and retrieve 1st, 2nd, 3rd, nth ordinal numbers in a clean and simple way. - if(floor((mod(interval, 100))/10) * 10 != 10) // examples: 12th, 111th, 213th will not execute this block + if(floor((interval % 100)/10) * 10 != 10) // examples: 12th, 111th, 213th will not execute this block { // otherwise, check normally for 1st,2nd,3rd insertions - switch(mod(interval, 10)) + switch(interval % 10) { case 1: return sprintf(_("%dst"), interval); case 2: return sprintf(_("%dnd"), interval);