Home

class: Point


The Point object represents a location in a two-dimensional coordinate system, where x represents
the horizontal axis and y represents the vertical axis.

Methods summary


Public methods
public clone(): PIXI.Point
public copy(p: PIXI.Point): void
public equals(p: PIXI.Point): boolean
public set(x: number, y: number): void
public clone(): PIXI.Point
public copy(p: PIXI.Point): void
public equals(p: PIXI.Point): boolean
public set(x: number, y: number): void

Properties


Name Type Attribute Description
x number public
y number public
x number public
y number public

Methods


clone(): PIXI.Point

Creates a clone of this point

Returns:

PIXI.Point


copy(p: PIXI.Point): void

Copies x and y from the given point

Params:

Name Type Attribute Description
p

The point to copy.

Returns:

void


equals(p: PIXI.Point): boolean

Returns true if the given point is equal to this point

Params:

Name Type Attribute Description
p

The point to check

Returns:

boolean


set(x: number, y: number): void

Sets the point to a new x and y position.
If y is omitted, both x and y will be set to x.

Params:

Name Type Attribute Description
x

position of the point on the x axis

y

position of the point on the y axis

Returns:

void


clone(): PIXI.Point

Creates a clone of this point

Returns:

PIXI.Point


copy(p: PIXI.Point): void

Copies x and y from the given point

Params:

Name Type Attribute Description
p

The point to copy.

Returns:

void


equals(p: PIXI.Point): boolean

Returns true if the given point is equal to this point

Params:

Name Type Attribute Description
p

The point to check

Returns:

boolean


set(x: number, y: number): void

Sets the point to a new x and y position.
If y is omitted, both x and y will be set to x.

Params:

Name Type Attribute Description
x

position of the point on the x axis

y

position of the point on the y axis

Returns:

void


  {
    "comment": "/**\n * The Point object represents a location in a two-dimensional coordinate system, where x represents\n * the horizontal axis and y represents the vertical axis.\n *\n * @class\n * @memberof PIXI\n */",
    "meta": {
        "range": [
            222,
            1635
        ],
        "filename": "Point.js",
        "lineno": 10,
        "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math",
        "code": {
            "id": "astnode100019037",
            "name": "Point",
            "type": "ClassDeclaration",
            "paramnames": [
                "x",
                "y"
            ]
        }
    },
    "classdesc": "

The Point object represents a location in a two-dimensional coordinate system, where x represents
the horizontal axis and y represents the vertical axis.

", "kind": "class", "memberof": "PIXI", "name": "Point", "longname": "PIXI.Point", "scope": "static", "params": [ { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 0, "description": "

position of the point on the x axis

", "name": "x" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 0, "description": "

position of the point on the y axis

", "name": "y" } ], "___id": "T000002R001800", "___s": true, "$methods": [ { "comment": "/**\n * Creates a clone of this point\n *\n * @return {PIXI.Point} a copy of the point\n */", "meta": { "range": [ 756, 817 ], "filename": "Point.js", "lineno": 36, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100019062", "name": "Point#clone", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Creates a clone of this point

", "returns": [ { "type": { "names": [ "PIXI.Point" ] }, "description": "

a copy of the point

" } ], "name": "clone", "longname": "PIXI.Point#clone", "kind": "function", "memberof": "PIXI.Point", "scope": "instance", "params": [], "___id": "T000002R001806", "___s": true, "skip": true, "slug": "PIXI.Pointclone", "filepath": "core\\math\\Point.js" }, { "comment": "/**\n * Copies x and y from the given point\n *\n * @param {PIXI.Point} p - The point to copy.\n */", "meta": { "range": [ 939, 986 ], "filename": "Point.js", "lineno": 46, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100019075", "name": "Point#copy", "type": "MethodDefinition", "paramnames": [ "p" ] }, "vars": { "": null } }, "description": "

Copies x and y from the given point

", "params": [ { "type": { "names": [ "PIXI.Point" ] }, "description": "

The point to copy.

", "name": "p" } ], "name": "copy", "longname": "PIXI.Point#copy", "kind": "function", "memberof": "PIXI.Point", "scope": "instance", "___id": "T000002R001807", "___s": true, "skip": true, "slug": "PIXI.Pointcopy", "filepath": "core\\math\\Point.js" }, { "comment": "/**\n * Returns true if the given point is equal to this point\n *\n * @param {PIXI.Point} p - The point to check\n * @returns {boolean} Whether the given point equal to this point\n */", "meta": { "range": [ 1197, 1271 ], "filename": "Point.js", "lineno": 57, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100019091", "name": "Point#equals", "type": "MethodDefinition", "paramnames": [ "p" ] }, "vars": { "": null } }, "description": "

Returns true if the given point is equal to this point

", "params": [ { "type": { "names": [ "PIXI.Point" ] }, "description": "

The point to check

", "name": "p" } ], "returns": [ { "type": { "names": [ "boolean" ] }, "description": "

Whether the given point equal to this point

" } ], "name": "equals", "longname": "PIXI.Point#equals", "kind": "function", "memberof": "PIXI.Point", "scope": "instance", "___id": "T000002R001808", "___s": true, "skip": true, "slug": "PIXI.Pointequals", "filepath": "core\\math\\Point.js" }, { "comment": "/**\n * Sets the point to a new x and y position.\n * If y is omitted, both x and y will be set to x.\n *\n * @param {number} [x=0] - position of the point on the x axis\n * @param {number} [y=0] - position of the point on the y axis\n */", "meta": { "range": [ 1538, 1632 ], "filename": "Point.js", "lineno": 69, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100019112", "name": "Point#set", "type": "MethodDefinition", "paramnames": [ "x", "y" ] }, "vars": { "": null } }, "description": "

Sets the point to a new x and y position.
If y is omitted, both x and y will be set to x.

", "params": [ { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 0, "description": "

position of the point on the x axis

", "name": "x" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 0, "description": "

position of the point on the y axis

", "name": "y" } ], "name": "set", "longname": "PIXI.Point#set", "kind": "function", "memberof": "PIXI.Point", "scope": "instance", "___id": "T000002R001809", "___s": true, "skip": true, "slug": "PIXI.Pointset", "filepath": "core\\math\\Point.js" }, { "comment": "/**\n * Creates a clone of this point\n *\n * @return {PIXI.Point} a copy of the point\n */", "meta": { "range": [ 756, 817 ], "filename": "Point.js", "lineno": 36, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100093741", "name": "Point#clone", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Creates a clone of this point

", "returns": [ { "type": { "names": [ "PIXI.Point" ] }, "description": "

a copy of the point

" } ], "name": "clone", "longname": "PIXI.Point#clone", "kind": "function", "memberof": "PIXI.Point", "scope": "instance", "params": [], "___id": "T000002R008740", "___s": true, "skip": true, "slug": "PIXI.Pointclone", "filepath": "core\\math\\Point.js" }, { "comment": "/**\n * Copies x and y from the given point\n *\n * @param {PIXI.Point} p - The point to copy.\n */", "meta": { "range": [ 939, 986 ], "filename": "Point.js", "lineno": 46, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100093754", "name": "Point#copy", "type": "MethodDefinition", "paramnames": [ "p" ] }, "vars": { "": null } }, "description": "

Copies x and y from the given point

", "params": [ { "type": { "names": [ "PIXI.Point" ] }, "description": "

The point to copy.

", "name": "p" } ], "name": "copy", "longname": "PIXI.Point#copy", "kind": "function", "memberof": "PIXI.Point", "scope": "instance", "___id": "T000002R008741", "___s": true, "skip": true, "slug": "PIXI.Pointcopy", "filepath": "core\\math\\Point.js" }, { "comment": "/**\n * Returns true if the given point is equal to this point\n *\n * @param {PIXI.Point} p - The point to check\n * @returns {boolean} Whether the given point equal to this point\n */", "meta": { "range": [ 1197, 1271 ], "filename": "Point.js", "lineno": 57, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100093770", "name": "Point#equals", "type": "MethodDefinition", "paramnames": [ "p" ] }, "vars": { "": null } }, "description": "

Returns true if the given point is equal to this point

", "params": [ { "type": { "names": [ "PIXI.Point" ] }, "description": "

The point to check

", "name": "p" } ], "returns": [ { "type": { "names": [ "boolean" ] }, "description": "

Whether the given point equal to this point

" } ], "name": "equals", "longname": "PIXI.Point#equals", "kind": "function", "memberof": "PIXI.Point", "scope": "instance", "___id": "T000002R008742", "___s": true, "skip": true, "slug": "PIXI.Pointequals", "filepath": "core\\math\\Point.js" }, { "comment": "/**\n * Sets the point to a new x and y position.\n * If y is omitted, both x and y will be set to x.\n *\n * @param {number} [x=0] - position of the point on the x axis\n * @param {number} [y=0] - position of the point on the y axis\n */", "meta": { "range": [ 1538, 1632 ], "filename": "Point.js", "lineno": 69, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100093791", "name": "Point#set", "type": "MethodDefinition", "paramnames": [ "x", "y" ] }, "vars": { "": null } }, "description": "

Sets the point to a new x and y position.
If y is omitted, both x and y will be set to x.

", "params": [ { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 0, "description": "

position of the point on the x axis

", "name": "x" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 0, "description": "

position of the point on the y axis

", "name": "y" } ], "name": "set", "longname": "PIXI.Point#set", "kind": "function", "memberof": "PIXI.Point", "scope": "instance", "___id": "T000002R008743", "___s": true, "skip": true, "slug": "PIXI.Pointset", "filepath": "core\\math\\Point.js" } ], "$attributes": [ { "comment": "/**\n * @member {number} PIXI.Point#x\n * @default 0\n */", "meta": { "range": [ 430, 508 ], "filename": "Point.js", "lineno": 18, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": {} }, "kind": "member", "name": "x", "type": { "names": [ "number" ] }, "defaultvalue": "0", "memberof": "PIXI.Point", "longname": "PIXI.Point#x", "scope": "instance", "___id": "T000002R001802", "___s": true, "skip": true, "slug": "PIXI.Pointx", "filepath": "core\\math\\Point.js" }, { "comment": "/**\n * @member {number} PIXI.Point#y\n * @default 0\n */", "meta": { "range": [ 538, 616 ], "filename": "Point.js", "lineno": 24, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": {} }, "kind": "member", "name": "y", "type": { "names": [ "number" ] }, "defaultvalue": "0", "memberof": "PIXI.Point", "longname": "PIXI.Point#y", "scope": "instance", "___id": "T000002R001804", "___s": true, "skip": true, "slug": "PIXI.Pointy", "filepath": "core\\math\\Point.js" }, { "comment": "/**\n * @member {number} PIXI.Point#x\n * @default 0\n */", "meta": { "range": [ 430, 508 ], "filename": "Point.js", "lineno": 18, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": {} }, "kind": "member", "name": "x", "type": { "names": [ "number" ] }, "defaultvalue": "0", "memberof": "PIXI.Point", "longname": "PIXI.Point#x", "scope": "instance", "___id": "T000002R008736", "___s": true, "skip": true, "slug": "PIXI.Pointx", "filepath": "core\\math\\Point.js" }, { "comment": "/**\n * @member {number} PIXI.Point#y\n * @default 0\n */", "meta": { "range": [ 538, 616 ], "filename": "Point.js", "lineno": 24, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": {} }, "kind": "member", "name": "y", "type": { "names": [ "number" ] }, "defaultvalue": "0", "memberof": "PIXI.Point", "longname": "PIXI.Point#y", "scope": "instance", "___id": "T000002R008738", "___s": true, "skip": true, "slug": "PIXI.Pointy", "filepath": "core\\math\\Point.js" } ], "$staticmethods": [], "$staticproperties": [], "$augments": [], "$augmentedBy": [], "filepath": "core\\math\\Point.js" }