1.2 update w/ GZDoom 4.9 features:
- Changeable player skins. - Ammo LEDs are now 1:1 with UT by using canvas textures. - Integrate some add-ons, including reskins. - Various fixes (some backported from Demolitionist). - Migrated from libeye to Gutamatics.
This commit is contained in:
parent
81ffca403d
commit
602a89cc68
1761 changed files with 4461 additions and 1597 deletions
29
zscript/dt_Gutamatics/VectorUtil.zsc
Normal file
29
zscript/dt_Gutamatics/VectorUtil.zsc
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
class dt_GM_VectorUtil {
|
||||
/// Linearly interpolates between two Vector3s, clamping the parameters.
|
||||
static Vector3 lerpVec3(Vector3 from, Vector3 to, double time) {
|
||||
time = clamp(time, 0, 1);
|
||||
return lerpUnclampedVec3(from, to, time);
|
||||
}
|
||||
|
||||
/// Linearly interpolates between two Vector3s.
|
||||
static Vector3 lerpUnclampedVec3(Vector3 from, Vector3 to, double time) {
|
||||
Vector3 ret;
|
||||
double reverseTime = 1 - time;
|
||||
ret = reverseTime * from + time * to;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// Linearly interpolates between two Vector2s, clamping the parameters.
|
||||
static Vector2 lerpVec2(Vector2 from, Vector2 to, double time) {
|
||||
time = clamp(time, 0, 1);
|
||||
return lerpUnclampedVec2(from, to, time);
|
||||
}
|
||||
|
||||
/// Linearly interpolates between two Vector2s.
|
||||
static Vector2 lerpUnclampedVec2(Vector2 from, Vector2 to, double time) {
|
||||
Vector2 ret;
|
||||
double reverseTime = 1 - time;
|
||||
ret = reverseTime * from + time * to;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue