Skip to content

Commit

Permalink
return (0, 0) when is not a pair
Browse files Browse the repository at this point in the history
  • Loading branch information
andreakarasho committed Jul 2, 2024
1 parent c22e541 commit abb8cd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/EcsID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ namespace TinyEcs;

public readonly bool IsValid => Value != 0;
public readonly bool IsPair => IDOp.IsPair(Value);
public readonly EcsID First => IDOp.GetPairFirst(Value);
public readonly EcsID Second => IDOp.GetPairSecond(Value);
public readonly EcsID First => IsPair ? IDOp.GetPairFirst(Value) : 0;
public readonly EcsID Second => IsPair ? IDOp.GetPairSecond(Value) : 0;
public readonly (EcsID, EcsID) Pair => (First, Second);


Expand Down

0 comments on commit abb8cd8

Please sign in to comment.