mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
cd4270d372
Summary: @public Having binary operators as member functions has disadvantages: - the left hand side cannot be converted to `YGFloatOptional` implicitly (which we need for `YGStyle` refs) - Operators are not necessarily commutative. By moving these operators into free functions, and adding overloads for both variants if one operand is `float`, we get these properties. Reviewed By: SidharthGuglani Differential Revision: D15078962 fbshipit-source-id: 2e228a2ef90a8083c91788caa9eedfd4d140677f