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.
29 lines
861 B
29 lines
861 B
namespace UnityEditor.VFX.Operator
|
|
{
|
|
[VFXHelpURL("Operator-OneMinus")]
|
|
[VFXInfo(name = "One Minus (1-x)", category = "Math/Arithmetic")]
|
|
class OneMinus : VFXOperatorNumericUniform
|
|
{
|
|
public class InputProperties
|
|
{
|
|
public float x = 0.0f;
|
|
}
|
|
|
|
protected override sealed string operatorName { get { return "One Minus (1-x)"; } }
|
|
|
|
protected override sealed VFXExpression[] BuildExpression(VFXExpression[] inputExpression)
|
|
{
|
|
var input = inputExpression[0];
|
|
var one = VFXOperatorUtility.OneExpression[input.valueType];
|
|
return new[] { one - input };
|
|
}
|
|
|
|
protected sealed override ValidTypeRule typeFilter
|
|
{
|
|
get
|
|
{
|
|
return ValidTypeRule.allowEverythingExceptInteger;
|
|
}
|
|
}
|
|
}
|
|
}
|