Szablon:Decimal to hexadecimal converter: Różnice pomiędzy wersjami

Z Minecraft Wiki Polska
Przejdź do nawigacji Przejdź do wyszukiwania
[wersja nieprzejrzana][wersja przejrzana]
Utworzył nową stronę „<!-- if one -->{{#ifeq:<!-- if -->{{#expr:255<{{{1|256}}}}}|0|<!-- then 2 digit code -->{{Decimal to hexadecimal converter/Switch|<!-- ---->{{#expr:<!-- ------>{...”
 
KsawiBOT (dyskusja | edycje)
d standaryzacja szablonu dokumentacji
 
(Nie pokazano 1 wersji utworzonej przez jednego użytkownika)
Linia 1: Linia 1:
<!--
<includeonly><!--
if one
if one
-->{{#ifeq:<!--
-->{{#ifeq:<!--
Linia 113: Linia 113:
-->}} }}<!--
-->}} }}<!--


--><noinclude>
--></includeonly><noinclude>
== Documentation ==
{{Dokumentacja}}
This  is a simple to use tool for dynamically converting decimal values to  hexadecimal values. It outputs in a 6 character hex format and so can  take decimal numbers up to 16777215. The currently system implemented  for truncating preceding 0's allows for outputs in 2, 3, and 6 character  hex format based on the imput.
[[Kategoria:Szablony|D]]</noinclude>
=== Code ===
In full the template code is as follows:
<pre>
{{Decimal to hexadecimal converter|1234}}
</pre>
But it is much easier to use it through the redirect dec-hex which allows it to be written out as:
<pre>{{Dec-hex|1234}}
</pre>
Both of which will output 4D2.

Aktualna wersja na dzień 15:24, 6 wrz 2021

[ podgląd | edytuj | historia | odśwież ]Dokumentacja

To proste narzędzie dynamicznie konwertuje wartości dziesiętne do szesnastkowych. Na wyjściu daje 6 znaków w formacie szesnastkowym oraz może wziąć dziesiętne liczby do 16777215. Aktualny system implementacji skraca poprzedzające zera na wyjściu.

Kod

By użyć, wystarczy wpisać np.:

{{Decimal to hexadecimal converter|1234}}

Alias:

{{Dec-hex|1234}}

Obydwa dadzą wynik 4D2.