Particlesystem RotationOverLifeTime constant not getting set as expected

Hi,

I have the below code, which is expected to set rotation of my particles at runtime.

    void ChangeParticleRotation()
    {
        //Tilting rain as per wind direction
        var rotationOverLifetimeModule = rainParticleSystem.rotationOverLifetime;

        ParticleSystem.MinMaxCurve minMaxCurveZ = new ParticleSystem.MinMaxCurve();
        minMaxCurveZ.mode = ParticleSystemCurveMode.Constant;
        minMaxCurveZ.constant = Mathf.Sign(oceanController.windDirection.z) * 45;
        rotationOverLifetimeModule.z = minMaxCurveZ;

        Debug.Log(rotationOverLifetimeModule.z.constant + "," + oceanController.windDirection.z + "," + Mathf.Sign(oceanController.windDirection.z));
    }

The debug line returns the below results

45,0.9824775,1
UnityEngine.Debug:Log(Object)
SkyManager:ChangeParticleRotation() (at Assets/Scripts/SkyManager.cs:104)
SkyManager:Update() (at Assets/Scripts/SkyManager.cs:39)

But in the particles, i can see the value for Z set as below! (Z = 2578.31)

5913314--631541--Particles Rotation OVer LifeTime Error.PNG

Can someone explain what is happening here. What am I doing wrong?
Your inputs are much appreciated.

Thanks,
Joshua.

Found the below link. Apparently i need to specify input in Radians.
Checking now.

https://gamedev.stackexchange.com/questions/158743/unity-particle-system-start-rotation-completely-incorrect-when-set-via-c-scrip

This worked.