This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Name" { | |
Properties { | |
_Name ("display name", Range (min, max)) = number | |
_Name ("display name", Float) = number | |
_Name ("display name", Int) = number | |
_Name ("display name", Color) = (number,number,number,number) | |
_Name ("display name", Vector) = (number,number,number,number) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using Math = System.Math; | |
public static class NearestPointTo | |
{ | |
/// <summary> | |
/// Find the closest point on an ellipse centered on the origin. | |
/// </summary> | |
/// Credit: | |
/// 2015-09 Original Paper by Luc. Maisonobe https://www.spaceroots.org/documents/distance/distance-to-ellipse.pdf |