鸟语天空
Mathf.Repeat()
post by:追风剑情 2017-5-11 14:27

public static float Repeat(float t, float length);

此方法相当于取模(t%length)

 for (int i = -6; i <= 6; i++ )
            Debug.Log(Mathf.Repeat(i, 3f));

运行测试

1111.png

评论:
发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容