DeltaAngle() public static method

public static DeltaAngle ( float current, float target ) : float
current float
target float
return float
Esempio n. 1
0
 public static float MoveTowardsAngle(float current, float target, float maxDelta)
 {
     target = current + Mathf.DeltaAngle(current, target);
     return(Mathf.MoveTowards(current, target, maxDelta));
 }
Esempio n. 2
0
 public static float SmoothDampAngle(float current, float target, ref float currentVelocity, float smoothTime, [DefaultValue("Mathf.Infinity")] float maxSpeed, [DefaultValue("Time.deltaTime")] float deltaTime)
 {
     target = current + Mathf.DeltaAngle(current, target);
     return(Mathf.SmoothDamp(current, target, ref currentVelocity, smoothTime, maxSpeed, deltaTime));
 }
 public static float SmoothDampAngle(float current, float target, ref float currentVelocity, float smoothTime, float maxSpeed, float deltaTime)
 {
     target = current + Mathf.DeltaAngle(current, target);
     return(Mathf.SmoothDamp(current, target, ref currentVelocity, smoothTime, maxSpeed, deltaTime));
 }