Part_type_speed - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

Description

Sets the speed properties for the given particle type. Particles will be created with a randomly generated speed between the minimum and maximum thresholds and will slow down or speed up each step depending on the relative speed change you specify. The speed of particles is never negative, so particles will slow down until they completely stop.

Parameters

Parameter Data Type Description
ind integer index of the particle type
min double minimum speed, default is 0
max double maximum speed, default is 0
incr double relative speed change each step, default is 0
wiggle double wiggling of the speed, default is 0

Return Values

void: This function does not return anything.

Example Call

// demonstrates setting the speed of a particle type to decelerate each step by 5
part_type_speed(type, 200, 50, -5, 0);

NOTOC