diff options
author | Hallam Roberts <MysteryPancake> | 2022-04-13 17:23:38 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-04-13 17:23:47 +0300 |
commit | 7dc4ac71e8dcbd801ca9d375cdd1bea88e6293ac (patch) | |
tree | c3e4e6f8ca2d672024c6753744cfdf4e9f8a86fa /source/blender/blenkernel/intern/particle_child.c | |
parent | 9c09e5ba242fffc4906d86ce111def89e481c048 (diff) |
Fix T97278: wrong hair particle shape with kink spiral
Revert change from 3da84d8b that incorrectly used M_PI_4.
Differential Revision: https://developer.blender.org/D14636
Diffstat (limited to 'source/blender/blenkernel/intern/particle_child.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_child.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c index 5dba4d3f003..524ee31229b 100644 --- a/source/blender/blenkernel/intern/particle_child.c +++ b/source/blender/blenkernel/intern/particle_child.c @@ -85,7 +85,7 @@ static void do_kink_spiral_deform(ParticleKey *state, * and goes up to the Golden Spiral for 1.0 * https://en.wikipedia.org/wiki/Golden_spiral */ - const float b = shape * (1.0f + sqrtf(5.0f)) / (float)M_PI_4; + const float b = shape * (1.0f + sqrtf(5.0f)) / (float)M_PI * 0.25f; /* angle of the spiral against the curve (rotated opposite to make a smooth transition) */ const float start_angle = ((b != 0.0f) ? atanf(1.0f / b) : (float)-M_PI_2) + (b > 0.0f ? -(float)M_PI_2 : (float)M_PI_2); |