Home Reference Source Test
import Point from 'pureimage/src/Point.js'
public class | source

Point

Represents a set of co-ordinates on a 2D plane

Test:

Constructor Summary

Public Constructor
public

Creates an instance of Point.

Member Summary

Public Members
public
public

Method Summary

Public Methods
public

distance(pt: *): *

public

divide(scalar: *): *

public

dotProduct(v: *): *

public

magnitude(): *

public

subtract(pt: *): *

Public Constructors

public constructor(x: number, y: number) source

Creates an instance of Point.

Params:

NameTypeAttributeDescription
x number

X position

y number

Y position

Test:

Public Members

public x: number source

public y: number source

Public Methods

public distance(pt: *): * source

Params:

NameTypeAttributeDescription
pt *

Return:

*

public divide(scalar: *): * source

Params:

NameTypeAttributeDescription
scalar *

Return:

*

public dotProduct(v: *): * source

Params:

NameTypeAttributeDescription
v *

Return:

*

public magnitude(): * source

Return:

*

public subtract(pt: *): * source

Params:

NameTypeAttributeDescription
pt *

Return:

*