ArccosineNode.cs 707 B

12345678910111213141516171819202122232425262728293031
  1. using System.Reflection;
  2. namespace UnityEditor.ShaderGraph
  3. {
  4. [Title("Math", "Trigonometry", "Arccosine")]
  5. class ArccosineNode : CodeFunctionNode
  6. {
  7. public ArccosineNode()
  8. {
  9. name = "Arccosine";
  10. }
  11. protected override MethodInfo GetFunctionToConvert()
  12. {
  13. return GetType().GetMethod("Unity_Arccosine", BindingFlags.Static | BindingFlags.NonPublic);
  14. }
  15. static string Unity_Arccosine(
  16. [Slot(0, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector In,
  17. [Slot(1, Binding.None)] out DynamicDimensionVector Out)
  18. {
  19. return
  20. @"
  21. {
  22. Out = acos(In);
  23. }
  24. ";
  25. }
  26. }
  27. }