2.2.4.14.1 fpoint::fpoint

Description

constructor which initializes the fpoint object from x and y coordinates


Copy constructor which initializes the fpoint object from another fpoint object

Syntax

fpoint( double x = 0, double y = 0 )


fpoint( fpoint pp )

Parameters

x
(optional) x coordinate
y
(optional) y coordinate


pp
source fpoint object

Return

Examples

EX1

void    fpoint_fpoint_ex1()
{
    fpoint    pt(1.2, 7.6);
    
    printf("x = %f   y = %f\n", pt.x, pt.y);
}


EX2

void    fpoint_fpoint_ex2()
{
    fpoint    pt(4.4, 7.7);
    
    // Initialize pt2 from pt:
    fpoint    pt2(pt);
    
    // Display pt2:
    printf("x = %f   y = %f\n", pt2.x, pt2.y);
}

Remark

See Also

Header to Include

origin.h