PI#
Constant / PI
Can Read
Cannot Write
Description#
Returns the ratio of the circumference of a circle to its diameter
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Get]
[Title("PI")]
[Category("Constant/PI")]
[Description("Returns the ratio of the circumference of a circle to its diameter")]
[Image(typeof(IconPI), ColorTheme.Type.Yellow)]
[Serializable]
public class TypeNumberConstantPI : TypeNumber
{
public override double GetPreview(GameObject source) => Math.PI;
public override double Get(Args args) => Math.PI;
public override string ToString()
{
return "PI";
}
}
}