API reference
Preparing search index…

sf::Rect, with integer division in getCenter().

Type hierarchy

Hierarchy

  • Rect<"i32">
    • IntRect
Source & inheritance
Member directory11

Constructors

Properties

Accessors

Methods

Constructors

Accessors

  • get scalarType(): T

    Rectangle component type: i32 integers or f32 floating-point values.

    Returns

    T
    Source & inheritance

Methods

  • Tests whether a point is inside the rectangle; includes minimum edges, excludes maximum edges, and supports negative sizes.

    Parameters

    point

    Returns

    boolean
    Source & inheritance
  • Returns

    Rect<"i32">
    Source & inheritance
  • Returns a new rectangle intersecting this and a same-type rectangle; returns undefined if there is no positive-area intersection.

    Parameters

    rectangle
    ReadonlyValue<Rect<"i32">>

    Returns

    undefined | Rect<"i32">
    Source & inheritance
  • Returns a copy of the center; integer rectangles halve their size using integer division truncated toward zero.

    Returns

    Vector2<"i32">
    Source & inheritance

Symbol members

"[mutableValue]": true
Source & inheritance
  • get "[rectNative]"(): NativeValueHandle<"rect">

    Returns

    NativeValueHandle<"rect">
    Source & inheritance
  • get "[rectStorage]"(): Int32Array | Float32Array

    Returns

    Int32Array | Float32Array
    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0