Files
ChunilENG/Assets/Plugins/XRLib/Util/Wathf.cs
정영민 2dd5d814a7 update
2025-02-20 09:59:37 +09:00

24 lines
582 B
C#

using UnityEditor;
using UnityEngine;
namespace WI
{
public static class Wathf
{
/// <summary>
/// 1.618 : 1 = x : y
/// ex) standard = 3
/// result[0] = f(x==standard)
/// result[1] = f(y==standard)
/// </summary>
/// <param name="standard"></param>
/// <param name="result"></param>
public static void GoldenRatio(float standard, out float[] result)
{
result = new float[2];
result[0] = standard * 1.618f;
result[1] = standard * 0.618f;
}
}
}