Package: graphene

Accessor graphene:point3d-x

Lambda List

graphene:point3d-x (p)

Syntax

(graphene:point3d-x p) => x
(setf (graphene:point3d-x p) x)

Arguments

p -- a graphene:point3d-t instance
x -- a float with the x coordinate

Details

Accessor of the x slot of the graphene:point3d-t structure. The x value is coerced to a float before assignment.

Examples

(graphene:with-point3d (p 0.5 1.0 1.5)
  (list (graphene:point3d-x p) (graphene:point3d-y p) (graphene:point3d-z p)))
=> (0.5 1.0 1.5)
(graphene:with-point3d (p)
  (setf (graphene:point3d-x p) 2.0
        (graphene:point3d-y p) 2.5
        (graphene:point3d-z p) 3.0)
  (list (graphene:point3d-x p) (graphene:point3d-y p) (graphene:point3d-z p)))
=> (2.0 2.5 3.0)    
 

See also

2024-1-20