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.
22 lines
777 B
22 lines
777 B
namespace UnityEditor.VFX.Operator
|
|
{
|
|
[VFXHelpURL("Operator-Atan2")]
|
|
[VFXInfo(name = "Atan2", category = "Math/Trigonometry", synonyms = new []{ "arc", "tangent" })]
|
|
class Atan2 : VFXOperatorNumericUniform
|
|
{
|
|
public class InputProperties
|
|
{
|
|
public float x = 1.0f;
|
|
public float y = 0.0f;
|
|
}
|
|
|
|
protected override sealed string operatorName { get { return "Atan2"; } }
|
|
|
|
protected override sealed ValidTypeRule typeFilter { get { return ValidTypeRule.allowEverythingExceptInteger; } }
|
|
|
|
protected override sealed VFXExpression[] BuildExpression(VFXExpression[] inputExpression)
|
|
{
|
|
return new[] { new VFXExpressionATan2(inputExpression[1], inputExpression[0]) };
|
|
}
|
|
}
|
|
}
|