Skip to content

Commit

Permalink
Simplified boolean XOR.
Browse files Browse the repository at this point in the history
  • Loading branch information
benfed committed Dec 11, 2018
1 parent 1811e83 commit d36bd41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BXSwiftUtils/Math & Geometry/Bool+Operators.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ extension Bool
// XOR
public static func ^^ (lhs: Bool, rhs: Bool) -> Bool
{
return (lhs && !rhs) || (!lhs && rhs)
return lhs != rhs
}
}

0 comments on commit d36bd41

Please sign in to comment.