Package: graphene

Function graphene:point-interpolate

Lambda List

graphene:point-interpolate (a b factor result)

Arguments

a -- a graphene:point-t instance
b -- a graphene:point-t instance
factor -- a number coerced to a double float with the linear interpolation factor
result -- a graphene:point-t instance for the interpolated point

Return Value

The graphene:point-t instance with the interpolated point.

Details

Linearly interpolates the coordinates of a and b using the given factor.

Examples

(graphene:with-points ((a 0 0) (b 1 2) result)
  (graphene:point-interpolate a b 0.5 result)
  (values (graphene:point-x result) (graphene:point-y result)))
=> 0.5
=> 1.0    
 

See also

2023-9-22