API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classSize

@codexo/exojs / math / stable

Mutable 2D size (width × height) value type. All arithmetic methods mutate in place and return `this` for chaining. When `height` is omitted from `set`, `add`, `subtract`, `scale`, or `divide` it defaults to the same value as `width` (uniform operation). `Size.temp` provides a shared scratch instance. `Size.zero` is a read-only sentinel.

4
props
9
methods
0
events
Import
import { Size } from '@codexo/exojs'

Mutable 2D size (width × height) value type. All arithmetic methods mutate in place and return `this` for chaining. When `height` is omitted from `set`, `add`, `subtract`, `scale`, or `divide` it defaults to the same value as `width` (uniform operation).

`Size.temp` provides a shared scratch instance. `Size.zero` is a read-only sentinel.

Constructors 1
new(width: number, height: number): Size
Methods 9
add(width: number, height: number): this
clone(): this
copy(size: object): this
destroy(): void
divide(width: number, height: number): this
equals(__namedParameters: Partial<Size>): boolean
scale(width: number, height: number): this
set(width: number, height: number): this
subtract(width: number, height: number): this
Properties 4
zero: Size
height: number
width: number
temp: Size
Source