MCPcopy Create free account
hub / github.com/pybind/pybind11 / operator-

Method operator-

tests/test_operator_overloading.cpp:45–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 }
44
45 Vector2 operator-() const { return Vector2(-x, -y); }
46 Vector2 operator+(const Vector2 &v) const { return Vector2(x + v.x, y + v.y); }
47 Vector2 operator-(const Vector2 &v) const { return Vector2(x - v.x, y - v.y); }
48 Vector2 operator-(float value) const { return Vector2(x - value, y - value); }

Callers

nothing calls this directly

Calls 1

Vector2Class · 0.85

Tested by

no test coverage detected