git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1202 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using OpenRa.FileFormats;
|
||||
using System.Drawing;
|
||||
using BluntDirectX.Direct3D;
|
||||
|
||||
namespace OpenRa.Game
|
||||
{
|
||||
@@ -24,6 +25,11 @@ namespace OpenRa.Game
|
||||
return (v > 0) ? v1 : v0;
|
||||
}
|
||||
|
||||
public static float Constrain(float x, Range<float> range)
|
||||
{
|
||||
return x < range.Start ? range.Start : x > range.End ? range.End : x;
|
||||
}
|
||||
|
||||
static PointF EncodeVertexAttributes(TextureChannel channel, int paletteLine)
|
||||
{
|
||||
Converter<TextureChannel, float> channelEncoder = delegate(TextureChannel c)
|
||||
|
||||
Reference in New Issue
Block a user