OSDN Git Service

Added Assets for main menu
[mindgames/Mindgames_main.git] / Mindgames / Library / PackageCache / com.unity.shadergraph@6.9.0 / Editor / Data / Nodes / Math / Basic / SquareRootNode.cs
1 using System.Reflection;
2
3 namespace UnityEditor.ShaderGraph
4 {
5     [Title("Math", "Basic", "Square Root")]
6     class SquareRootNode : CodeFunctionNode
7     {
8         public SquareRootNode()
9         {
10             name = "Square Root";
11         }
12
13
14         protected override MethodInfo GetFunctionToConvert()
15         {
16             return GetType().GetMethod("Unity_SquareRoot", BindingFlags.Static | BindingFlags.NonPublic);
17         }
18
19         static string Unity_SquareRoot(
20             [Slot(0, Binding.None)] DynamicDimensionVector In,
21             [Slot(1, Binding.None)] out DynamicDimensionVector Out)
22         {
23             return
24                 @"
25 {
26     Out = sqrt(In);
27 }
28 ";
29         }
30     }
31 }