Nice little piece of code found here
public static float DistanceToLine(Ray ray, Vector3 point) { return Vector3.Cross(ray.direction, point - ray.origin).magnitude; }
Nice little piece of code found here
public static float DistanceToLine(Ray ray, Vector3 point) { return Vector3.Cross(ray.direction, point - ray.origin).magnitude; }
It took a while to nail this down. There are a few plug-ins for Google Chrome but, from looking at various forum posts, they seem to be unreliable. I eventually ended up running Google Chrome with two command line options as follows: –
--disk-cache-dir=null --disk-cache-size=0
I’ve been using this for a while now, and it seems to work quite nicely
To add command line options on Windows, look here
To add the same cache disable from within Visual Studio code, add the following to your launch.json: –
"runtimeArgs": [ "--disk-cache-dir=null", "--disk-cache-size=0" ]
Another quick code snippet showing how to replace a piece of a string with an alternate string: –
var myString = "development environment"; myString = myString.replace("development", "release");
Quick snippet to find a string within a string in JavaScript: –
var question = "ques_test"; if(question.includes("ques_")) { console.log("Question Found"); }
Quick snippet to find a string in a string in PHP: –
$question = 'How are you?';
if (strpos($question, 'are') !== false) {
echo 'Found it';
}