This file contains hidden or 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
fabric.Arrow = fabric.util.createClass(fabric.Line, { | |
type: 'Arrow', | |
initialize: function(element, options) { | |
options || (options = {}); | |
this.callSuper('initialize', element, options); | |
}, | |
toObject: function() { |
This file contains hidden or 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
/* | |
Inspired by: https://medium.com/@gcanti/introduction-to-optics-lenses-and-prisms-3230e73bfcfe | |
*/ | |
using System; | |
using static System.Console; | |
public static class Program | |
{ | |
public static void Main() |
This file contains hidden or 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 |