AbsoluteSize/Position does not give accurate pixel values

I’m trying to do some math to position elements and taking into account instances AbsolutePosition/Size to do so. However, these properties somehow get decimals. Unsure how you can have 0.325 of a pixel? I would have thought that sizing something based on the rounded number, however that isn’t the case either.

This element says its 182.325


However, when I hop in paint.net, and count the pixels

I’m told it’s 183…
image
so does it just math.ceil the AbsoluteSize? How am I supposed to accurately size UI based on something else’s AbsoluteSize? Especially when if math.ceil can’t be used on all cases, as 184.041 is 184 pixels… what’s the cut off to round up or down on this?
image

image
Worth noting all documentation claims these to 2 properties are based on pixels GuiBase2d | Documentation - Roblox Creator Hub


and you can’t get a % of a pixel. Worth noting ALL these screenshots are when using screen emulator at 1920x1080 and set to Actual Resolution

This in turn makes it impossible to position/size other UI elements in a way that relies on AbsoluteSize/Position (such as my use case above)

Expected behavior

AbsoluteSize/Position should return EXACT integers. There is no such thing as a decimal of a pixel, so these numbers should always be whole numbers, and represent their actual pixel size accurately.

1 Like

Thanks for the report! We’ll follow up when there’s any update on the issue.

1 Like

I’ve also noticed this with Camera.ViewportSize saying that my game window is… 1283.3 pixels wide?