Maze / Library /PackageCache /com.unity.visualscripting@1.8.0 /Runtime /VisualScripting.Flow /Framework /Math /Angle.cs
| namespace Unity.VisualScripting | |
| { | |
| [] | |
| public abstract class Angle<T> : Unit | |
| { | |
| /// <summary> | |
| /// The first vector. | |
| /// </summary> | |
| [] | |
| public ValueInput a { get; private set; } | |
| /// <summary> | |
| /// The second vector. | |
| /// </summary> | |
| [] | |
| public ValueInput b { get; private set; } | |
| /// <summary> | |
| /// The angle between A and B. | |
| /// </summary> | |
| [] | |
| [] | |
| public ValueOutput angle { get; private set; } | |
| protected override void Definition() | |
| { | |
| a = ValueInput<T>(nameof(a)); | |
| b = ValueInput<T>(nameof(b)); | |
| angle = ValueOutput(nameof(angle), Operation).Predictable(); | |
| Requirement(a, angle); | |
| Requirement(b, angle); | |
| } | |
| private float Operation(Flow flow) | |
| { | |
| return Operation(flow.GetValue<T>(a), flow.GetValue<T>(b)); | |
| } | |
| public abstract float Operation(T a, T b); | |
| } | |
| } | |