I have for example such code:

```
scope.people;
scope.agedPeople;

```

If people value changes I need to do this:

```
scope.agedPeople = scope.people * 0.3;

```

And if agedPeople value changes I need to do this:

```
scope.people = scope.agedPeople / 0.3;

```

I wanted to use $watch, but as you can see I have the circular references... I solved it like this:

```
    scope.checkIsPeopleCounted = function() {
      var countedPeople;

      countedPeople = scope.agedPeople * 0.3;

      return countedPeople === scope.people;
    };

    scope.checkIsAgedPeopleCounted = function() {
      var countedAgedPeople;

      countedAgedPeople = scope.people / 0.3;

      return countedAgedPeople === scope.agedPeople;
    };

    scope.$watch('people', function() {
      !scope.checkIsAgedPeopleCounted() && (scope.agedPeople = scope.people / 0.3);
    });

scope.$watch('agedPeople', function() {
  !scope.checkIsPeopleCounted() && (scope.people = scope.agedPeople * 0.3);
});

```

but it looks not very good. maybe there is another solution?

How to make it in angular?