are Math.floor Math.pow ... depending of a plugin I might not have ?
Le mardi 4 février 2014 13:23:10 UTC+1, julien23 a écrit :
>
> Thank you Eric
>
> I still have "108.95-84.72 = 24.230000000000004"
> I'll figure out why later
>
> Regards
>
> Julien
>
> Le mardi 4 février 2014 12:06:42 UTC+1, Eric Shulman a écrit :
>>
>> On Tuesday, February 4, 2014 1:18:02 AM UTC-8, julien23 wrote:
>>>
>>> I made this tiddler:
>>> [[calcTid]]
>>> $1
>>> And I call it with:
>>> [[test]]
>>> <<tiddler calcTid with: {{108.95-84.72}}>>
>>> it works almost fine : 24.230000000000004
>>>
>>> I wish I could
>>>
>>> - remove the extra 0000000000004
>>> - write litteraly 108.95-84.72=24.23 without writing twice the
>>> operation like
>>> <<tiddler calcTid with: [[108.95-84.72=]]{{108.95-84.72}}>>
>>>
>>> Try this:
>>
>> Change [[calcTid]] to:
>> /%
>> !out
>> $1=$2
>> !end
>> %/<<tiddler calcTid##out with: "$1" {{Math.floor(($1)*Math.pow(10,16)) /
>> Math.pow(10,16) }}>>
>> then, to call it in [[test]], write:
>> <<tiddler calcTid with: 108.95-84.72>>
>>
>>
>> enjoy,
>> -e
>> Eric Shulman
>> TiddlyTools / ELS Design Studios
>>
>> YOUR DONATIONS ARE IMPORTANT!
>> HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
>> http://TiddlyTools.github.com/fundraising.html#MakeADonation
>>
>> Professional TiddlyWiki Consulting Services...
>> Analysis, Design, and Custom Solutions:
>> http://www.TiddlyTools.com/#Contact
>>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.