Function point
Source pub const fn point<T: Clone + Debug + Default + PartialEq>(
x: T,
y: T,
) -> Point<T>
Expand description
Constructs a new Point<T> with the given x and y coordinates.
§Arguments
x - The x coordinate of the point.
y - The y coordinate of the point.
§Returns
Returns a Point<T> with the specified coordinates.
§Examples
use gpui::point;
let p = point(10, 20);
assert_eq!(p.x, 10);
assert_eq!(p.y, 20);