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
type Ray(position : Vector3D, direction:Vector3D) = | |
member ray.Position = position | |
member ray.Direction = direction | |
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
class Ray | |
{ | |
private readonly Vector3D position; | |
private readonly Vector3D direction; | |
public Ray(Vector3D position, Vector3D direction) | |
{ | |
this.position = position; | |
this.direction = direction; | |
} |
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
float fTimer; | |
float fPixellateFactor = 1.0f; | |
sampler ColorMapSampler : register(s0); | |
float4 NormalShader(float2 Tex:TEXCOORD0) : COLOR | |
{ | |
float4 color = tex2D(ColorMapSampler, Tex); | |
return color; | |
} |
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
namespace FSharpTracer | |
open System | |
type Vector = | |
{ X : float | |
Y : float | |
Z : float } | |
member v.Dot(v1 : Vector) = (v.X * v1.X) + (v.Y * v1.Y) + (v.Z * v1.Z) | |
member v.Length() = sqrt (v.Dot v) |
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
#pragma once | |
#include <math.h> | |
class Vector | |
{ | |
const double x, y, z; | |
public: | |
Vector(double x, double y, double z); | |
double Dot(Vector); | |
double Length(); |
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
#include "Vector.h" | |
Vector::Vector(double px, double py, double pz) : x(px), y(py), z(pz) { | |
} | |
double Vector::Dot(Vector v) { | |
return (this->x * v.x) + (this->y * v.y) + (this->z * v.z); | |
} | |
double Vector::Length(){ |
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
package types | |
import "math" | |
type Vector struct { | |
X, Y, Z float64 | |
} | |
func (v Vector) Dot(v1 Vector) float64 { | |
return (v.X * v1.X) + (v.Y * v1.Y) + (v.Z * v1.Z) |
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
use std::num; | |
pub struct Vector { | |
pub x: f64, | |
pub y: f64, | |
pub z: f64 | |
} | |
impl Vector { | |
pub fn dot(&self, v:Vector) -> f64 { |
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
import Foundation | |
class Vector { | |
let x,y,z: Double; | |
init(x:Double, y:Double, z:Double) { | |
self.x = x; | |
self.y = y; | |
self.z = z; | |
} |
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
open System | |
open System.Diagnostics | |
printfn "XDesProc killer" | |
printfn "Press Return to Close" | |
printfn "======================" | |
let rec killer() = async { | |
let xdesproc = Process.GetProcessesByName "xdesproc" |
OlderNewer