gd_core/addons/core/math/Real.cs

39 lines
746 B
C#

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// D E R E L I C T
//
/// // (c) 2003..2025
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Godot;
static public class SingleEx
{
static public float Lerp( this float start, float end, float amount ) => start + ( end - start ) * amount;
}
static public class DoubleEx
{
static public double Lerp( this double start, double end, double amount ) => start + ( end - start ) * amount;
}
static public class Vector3Ex
{
extension( Node3D n )
{
public Vector3 Forward => -n.Transform.Basis.Z;
public Vector3 Right => n.Transform.Basis.X;
}
}