fpoint3d::fpoint3d

Description

constructor which initializes the fpoint3d object from x, y, and z coordinates


Copy constructor which initializes the fpoint3d object from another fpoint3d object

Syntax

fpoint3d( double x = 0, double y = 0, double z = 0 )

fpoint3d( fpoint3d pp )

Parameters

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

pp
source fpoint3d object

Return

Examples

EX1

void    fpoint3d_fpoint3d_ex1()
{
    fpoint3d    pt(2.2, 7.6, 0.5);
    
    printf("x = %f   y = %f   z = %f\n", pt.x, pt.y, pt.z);
}


EX2

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

Remark

See Also

header to Include

origin.h