Update CBool.cs
Left-handed and Right-handed operators were redundant due to previous casts. Also added the subtraction operation which I had forgotten.
This commit is contained in:
parent
892c1f6a14
commit
c8e4be954e
1 changed files with 5 additions and 11 deletions
|
|
@ -56,22 +56,16 @@ namespace Raylib_cs
|
|||
* to a native boolean or integer, or a CBool.
|
||||
*/
|
||||
|
||||
// Between CBools
|
||||
// Addition
|
||||
public static CBool operator +(CBool left, CBool right)
|
||||
{
|
||||
return new CBool { value = (sbyte)(left.value + right.value) };
|
||||
}
|
||||
|
||||
// Left-hand CBool
|
||||
public static CBool operator +(CBool left, bool right)
|
||||
// Subtraction
|
||||
public static CBool operator -(CBool left, CBool right)
|
||||
{
|
||||
return new CBool { value = (sbyte)(left.value + (right ? 1 : 0)) };
|
||||
}
|
||||
|
||||
// Right-hand CBool
|
||||
public static CBool operator +(bool left, CBool right)
|
||||
{
|
||||
return new CBool { value = (sbyte)((left ? 1 : 0) + right.value) };
|
||||
return new CBool { value = (sbyte)(left.value - right.value) };
|
||||
}
|
||||
|
||||
// ToString override
|
||||
|
|
|
|||
Loading…
Reference in a new issue