Material Sine in C++
Hello, I have done gerstner waves material and now I want to reproduce it in C++. Does anyone know how to reproduce Sine function in C++?
(comments are locked)

Unreal has a math utility class called FMath. You will want to use its SinCos function it will look like this:
inputVal is whatever you are trying to compute the Sine of. answered Jul 09 '18 at 03:48 AM Brian Johnstone (suspended)
(comments are locked)

Material Sine is described here https://docs.unrealengine.com/enus/Engine/Rendering/Materials/ExpressionReference/Math And it's not clear sin. If anyone is looking for Sine in C++ it looks like this:
It's not perfect though.
(comments are locked)

If you are trying to calculate the value of Sine or Cosine withing a material function, I believe there is a serious bug in UE. the sine function returns .43 for sin(1.57079).
(comments are locked)

Follow this question
Once you sign in you will be able to subscribe for any updates here