Version: 2019.3
public static float SnapValue (float val, float snap);

パラメーター

valueThe value to snap.
snapThe increment to snap to.

戻り値

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

説明

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


パラメーター

valueThe value to snap.
snapThe increment to snap to.

戻り値

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

説明

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


パラメーター

valueThe value to snap.
snapThe increment to snap to.

戻り値

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

説明

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