private RotationInfo TryDequeueLastRotateInfo() { RotationInfo result = null; while (_rotationQueue.TryDequeue(out var info)) { result = info; } return(result); }
public Task RotateYZAsync(int angles) { var rotationInfo = new RotationInfo { RotationType = RotationType.RotationYZ, RotateRadiansTotals = angles * Math.PI / 180, }; _rotationQueue.Enqueue(rotationInfo); TryStartProcessRotationTask(); return(Task.CompletedTask); }