Garry's Mod Wiki

Revision Difference

DNumSlider:SetDecimals#527709

<function name="SetDecimals" parent="DNumSlider" type="panelfunc"> <ispanel>yes</ispanel> <description>Sets the desired amount of numbers after the decimal point. <note> This doesn't affect values passed to <page>DNumSlider:OnValueChanged</page>. </note> ⤶ <note>⤶ To get right values passed to <page>DNumSlider:OnValueChanged</page> use <page>math.Round</page>.⤶ </note>⤶ </description> <realm>Client</realm> <args> <arg name="decimals" type="number">0 for whole numbers only, 1 for one number after the decimal point, etc.</arg> </args> </function>