34 lines
642 B
C#
34 lines
642 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace StgSharp.Graphics
|
|
{
|
|
public struct GLclampd
|
|
{
|
|
private double value;
|
|
|
|
public void SetValue(double v)
|
|
{
|
|
if (v<0||v>1)
|
|
{
|
|
throw new ArgumentOutOfRangeException("Input is out of range");
|
|
}
|
|
else
|
|
{
|
|
value = v;
|
|
}
|
|
}
|
|
|
|
public double Value()
|
|
{
|
|
return this.value;
|
|
}
|
|
|
|
public static implicit operator double(GLclampd gLclampd)
|
|
{
|
|
return gLclampd.value;
|
|
}
|
|
}
|
|
}
|