void accelerate(){ if(is_decelerating()) return; else if(current_vel < target_vel && (field_state.substage == DRIVE_SUBSTAGE || field_state.substage == DUMPING_SUBSTAGE)){ if(field_state.curr_time < field_state.start_drive_time + accelerate_time){ current_vel = format_velocity(scale_values(field_state.curr_time - field_state.start_drive_time, accelerate_time, target_vel)); } else{ current_vel = target_vel; } } }
void Scale_Stack(Stack *stack, int channel, double factor, double offset) { return (scale_values(stack->array,stack->kind,stack->width*stack->height*stack->depth, channel,factor,offset)); }
void Scale_Image(Image *image, int channel, double factor, double offset) { return (scale_values(image->array,image->kind,image->width*image->height, channel,factor,offset)); }