You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
742 B
27 lines
742 B
namespace UnityEditor.VFX.Operator
|
|
{
|
|
[VFXHelpURL("Operator-Round")]
|
|
[VFXInfo(category = "Math/Clamp")]
|
|
class Round : VFXOperatorNumericUniform
|
|
{
|
|
public class InputProperties
|
|
{
|
|
public float x = 0.5f;
|
|
}
|
|
|
|
protected override sealed string operatorName { get { return "Round"; } }
|
|
|
|
protected override sealed VFXExpression[] BuildExpression(VFXExpression[] inputExpression)
|
|
{
|
|
return new[] { VFXOperatorUtility.Round(inputExpression[0]) };
|
|
}
|
|
|
|
protected sealed override ValidTypeRule typeFilter
|
|
{
|
|
get
|
|
{
|
|
return ValidTypeRule.allowEverythingExceptIntegerAndDirection;
|
|
}
|
|
}
|
|
}
|
|
}
|