Best way to convert this??

Hey guys I’m trying to move part of my code to C++ and after lot of training I’ve been able to start this!
I still have doubts on how properly write down this kind of situation. Can someone tell me how could I write this in C++ and what logic should I apply when I face this situation?
I would like to learn more and be able to convert my prototype into code, thanks for your help guys :smiley:

// Pseudo code, may have errors...
// You'll have to include UKismetMathLibrary.h

float AbsoluteCapsuleRotationYaw = FMath::Abs(MyCapsuleComponent->GetRelativeRotation.Yaw);
float NormalizedRotation = UKismetMathLibrary::NormalizeToRange(AbsoluteCapsuleRotationYaw, 0.0f, 35.0f);
float FinalClampedRotation = FMath::Clamp(NormalizedRotation, 0.0f, 1.0f);

Coool thanks!!! I wrote a different thing but I guess this is better :smiley: