User Tools

Site Tools


dev:core:funref:decode_pos

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
dev:core:funref:decode_pos [2020-01-22 10:53]
admin ↷ Page moved from reference:advtrains:decode_pos to dev:core:funref:decode_pos
dev:core:funref:decode_pos [2020-01-22 10:53] (current)
admin ↷ Links adapted because of a move operation
Line 11: Line 11:
 ===== Extended description ===== ===== Extended description =====
 This function creates a string from the given Minetest position vector, suitable for use as a table index.   This function creates a string from the given Minetest position vector, suitable for use as a table index.  
-See also ''[[reference:advtrains:encode_pos|advtrains.encode_pos]]''.+See also ''[[dev:core:funref:encode_pos|advtrains.encode_pos]]''.
  
 ===== Parameters ===== ===== Parameters =====
-  * ''pts'' //(string)//: a table index string created by ''[[reference:advtrains:encode_pos|advtrains.encode_pos]]''.+  * ''pts'' //(string)//: a table index string created by ''[[dev:core:funref:encode_pos|advtrains.encode_pos]]''.
  
 ===== Returns ===== ===== Returns =====
Line 33: Line 33:
  
 ===== How it works internally ===== ===== How it works internally =====
-This function converts back strings created by ''[[reference:advtrains:encode_pos|advtrains.encode_pos]]'' to their original vector form. Y, X and Z coordinates are treated separately: the corresponding parts of the argument are extracted and passed to ''dec'', which converts the hexadecimal form of a number to its decimal form.+This function converts back strings created by ''[[dev:core:funref:encode_pos|advtrains.encode_pos]]'' to their original vector form. Y, X and Z coordinates are treated separately: the corresponding parts of the argument are extracted and passed to ''dec'', which converts the hexadecimal form of a number to its decimal form.
   - Y coordinate is encoded in characters 1 to 4.   - Y coordinate is encoded in characters 1 to 4.
   - X coordinate is encoded in characters 5 to 8.   - X coordinate is encoded in characters 5 to 8.
dev/core/funref/decode_pos.1579686809.txt.gz · Last modified: 2020-01-22 10:53 by admin