public static float SnapValue (float val, float snap);

Parameters

valueThe value to snap.
snapThe increment to snap to.

Returns

float If snapping is active, rounds value to the closest multiple of snap (snap can only be positive).

Description

Rounds value to the closest multiple of snap if snapping is active. Note that snap can only be positive.


Parameters

valueThe value to snap.
snapThe increment to snap to.

Returns

void If snapping is active, rounds value to the closest multiple of snap (snap can only be positive).

Description

Rounds value to the closest multiple of snap if snapping is active. Note that snap can only be positive.


Parameters

valueThe value to snap.
snapThe increment to snap to.

Returns

void If snapping is active, rounds value to the closest multiple of snap (snap can only be positive).

Description

Rounds value to the closest multiple of snap if snapping is active. Note that snap can only be positive.