Quantcast

Custom Units & Calculation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Custom Units & Calculation

Simon Mosk-Aoyama
Hi All-

I apologize if this question has been asked and answered previously, for
some reason my searches turn up no
results despite the term in the email archives.

I'm attempting to create a new custom unit to model mass, so I created
Type:Weight, and gave it the following
values:

[[Corresponds to::1 g, gram, grams]]
[[Corresponds to::0.001 kg, killogram, kgs, killograms]]
[[Corresponds to::1000 mg, milligram, milligrams, mgs]]
[[Corresponds to::1000000 mcg, microgram, micrograms, mcgs]]

I'd like to do some calculations based on some properties with this type:
I'd ideally like do so something like:
{{#expr:{{{Value_1}}}*{{{Value_2}}}/100}}

Where Value_1 and Value_2 are both properties of Type:Weight. This doesn't
work because the unit isn't in numeric
format (I believe), so I'm wondering if there is a way for me to retrieve
the underlying numeric value of the unit to
use in the calculation? Or is there a better way to do this? Any help would
be much appreciated!

thanks

-Simon
------------------------------------------------------------------------------

_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom Units & Calculation

mog404
Has this been answered? I am very interested in accomplishing the same thing. Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom Units & Calculation

mog404
Found it on mediawiki.org help page!
Loading...