c# - Mathf.PingPong 从 1 到 0
问题描述
我已经创建了一个从 1 到 0 的 PingPong 助手,但是我很难将其反转,因此值从 1 变为 0。
下面你可以看到我目前正在使用的代码。我也不确定这是否可能。
_lerpPulse = PingPong(Time.time * 0.5f, 0f, 1f);
还有帮手
float PingPong(float aValue, float aMin, float aMax)
{
return Mathf.PingPong(aValue, aMax - aMin) + aMin;
}
提前致谢!
解决方案
推荐阅读
- octobercms - 如何在 october cms 中安装和设置内容编辑器插件?
- deep-learning - DeepLearning的学习数据(jpeg)和嵌入式系统(raw)的区别
- javascript - 使用 XMLHttpRequest 方法访问 api 时自动设置为“OPTIONS”,但我将方法初始化为“POST、PUT、GET 或 DELETE”
- vb.net - GetResponse 不是 UWP 中 WebRequest 的成员
- android - 在根项目中找不到任务“组装”
- javascript - 在数组中查找对象的数组索引正在影响使用 grunt 的缩小和丑化
- android - 如何增加android中改造库的上传时间
- android - 找一个类似于网络音频API的android库
- javascript - 在 reactjs 中相对于其父级定位组件
- html - 图标真棒在同一行