| 41 | double weight = 1.0; |
| 42 | |
| 43 | Particle Weighted() const |
| 44 | { |
| 45 | Particle weighted = *this; |
| 46 | weighted.x *= weight; |
| 47 | weighted.y *= weight; |
| 48 | weighted.yaw *= weight; |
| 49 | weighted.x_vel *= weight; |
| 50 | weighted.yaw_vel *= weight; |
| 51 | weighted.weight = 1.0; |
| 52 | return weighted; |
| 53 | } |
| 54 | |
| 55 | Particle operator+(const Particle & other) const |
| 56 | { |