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

返回

float 如果“snap”为正数,返回舍入值,否则返回为“val”。

描述

将值“val”四舍五入到“snap”的最接近倍数(snap 只能是正数)。