Difference between revisions of "Talk:GetPositionX - ObjectReference"
Jump to navigation
Jump to search
Talk:GetPositionX - ObjectReference (edit)
Revision as of 09:29, 14 January 2019
, 09:29, 14 January 2019→GetCoordinateX: Corrected the math.
imported>Rasikko (→Global and Local positions: Removed) |
imported>Rasikko (→GetCoordinateX: Corrected the math.) |
||
Line 6: | Line 6: | ||
== GetCoordinateX == | == GetCoordinateX == | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
Int Function GetCoordinateX( | Int Function GetCoordinateX(float afPosX) | ||
; Returns the X coordinate. | |||
int posX = afPosX as int | |||
if (posX < 0) | |||
return (posX / 4096) - 1 | |||
else | |||
return posX / 4096 | |||
endif | |||
EndFunction | EndFunction | ||
</source> | </source> | ||
--[[User:Rasikko|Rasikko]] ([[User talk:Rasikko|talk]]) 2019-01-14T09:29:10 (EST) | |||