mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-09 14:45:28 +00:00
Merge pull request #3 from Nihlus/fix-vector4-clamp
Fix Vector4 clamping functions
This commit is contained in:
commit
670feeadbd
|
@ -774,8 +774,8 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
vec.X = vec.X < min.X ? min.X : vec.X > max.X ? max.X : vec.X;
|
vec.X = vec.X < min.X ? min.X : vec.X > max.X ? max.X : vec.X;
|
||||||
vec.Y = vec.Y < min.Y ? min.Y : vec.Y > max.Y ? max.Y : vec.Y;
|
vec.Y = vec.Y < min.Y ? min.Y : vec.Y > max.Y ? max.Y : vec.Y;
|
||||||
vec.Z = vec.X < min.Z ? min.Z : vec.Z > max.Z ? max.Z : vec.Z;
|
vec.Z = vec.Z < min.Z ? min.Z : vec.Z > max.Z ? max.Z : vec.Z;
|
||||||
vec.W = vec.Y < min.W ? min.W : vec.W > max.W ? max.W : vec.W;
|
vec.W = vec.W < min.W ? min.W : vec.W > max.W ? max.W : vec.W;
|
||||||
return vec;
|
return vec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -790,8 +790,8 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
result.X = vec.X < min.X ? min.X : vec.X > max.X ? max.X : vec.X;
|
result.X = vec.X < min.X ? min.X : vec.X > max.X ? max.X : vec.X;
|
||||||
result.Y = vec.Y < min.Y ? min.Y : vec.Y > max.Y ? max.Y : vec.Y;
|
result.Y = vec.Y < min.Y ? min.Y : vec.Y > max.Y ? max.Y : vec.Y;
|
||||||
result.Z = vec.X < min.Z ? min.Z : vec.Z > max.Z ? max.Z : vec.Z;
|
result.Z = vec.Z < min.Z ? min.Z : vec.Z > max.Z ? max.Z : vec.Z;
|
||||||
result.W = vec.Y < min.W ? min.W : vec.W > max.W ? max.W : vec.W;
|
result.W = vec.W < min.W ? min.W : vec.W > max.W ? max.W : vec.W;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in a new issue