求解求解,p.fngetdistancee是什么意思

推荐到广播
256060 人聚集在这个小组
(草儿-mela)
(草儿-mela)
(草儿-mela)
第三方登录:From MapToolDoc
 Note: This function can only be used in a
o Introduced in version 1.3b51
Returns the distance between two tokens or objects.
getDistance(target)
getDistance(target, units)
getDistance(target, units, source)
getDistance(target, units, source, metric)
Parameters
target - The id of the token that the distance is measured to.
units - If set to false(0), the distance is given in cells, otherwise the default is to return the distance in Distance Per Cell units.
source - The id of the token to measure the distance from, the default is the current token.
metric - The movement metric to use which defaults to the movement metric in the users preferences, the metric can be one of the following strings
NO_GRID - The grid is ignored and straight line distance between the tokens is returned.
ONE_TWO_ONE - First Diagonal movement costs 1, second 2, and so on (Square grid only).
ONE_ONE_ONE - Diagonal movement costs a single square (Square grid only).
MANHATTAN - Diagonal movement costs 2 (Square grid only).
NO_DIAGONALS - No diagonal movement is allowed (Square grid only).
To get the distance from the current token to the Altar.
[h: dist = getDistance(&Altar&)]
To get the distance between the Altar and the Sacrifice in the number of squares or hexes.
[h: dist = getDistance(&Altar&, 0, &Sacrifice&)]
To get the distance between the Altar and the Sacrifice in map distance units.
[h: dist = getDistance(&Altar&, 1, &Sacrifice&)]
To get the straight line distance between the Altar and the Sacrifice.
[h: dist = getDistance(&Altar&, 1, &Sacrifice&, &NO_GRID&)]
1.3b55 - Added the optional metric argument.

我要回帖

更多关于 getdistance百度地图 的文章

 

随机推荐