C# Class WebGame.Utility

Afficher le fichier Open project: AdmiralPotato/ggj2013

Méthodes publiques

Свойство Type Description
Random System.Random

Méthodes publiques

Méthode Description
ApproximatelyEqual ( double left, double right, double epsilon = 0.001 ) : bool
FromUnixTimestamp ( int unixTimestamp ) : System.DateTime

Creates a new System.DateTime from the specified timestamp (time measured in the number of seconds).

Magnitude ( this vector ) : double
Multiply ( this vector, double coefficient ) : Vector3
NormalizeOrientation ( this angle ) : double
NormalizeTurn ( this angle ) : double
PointToSegmentDistance ( Vector3 segmentBegin, Vector3 segmentEnd, Vector3 point ) : double
PrintTimeSpan ( this time, bool isInPast = true ) : string
Quadrance ( this vector ) : double
SphereIntersectsLineSegment ( Vector3 segmentBegin, Vector3 segmentEnd, Vector3 sphereCenter, double radius ) : bool
UnixTimestamp ( System.DateTime dateTime ) : int

Returns the specified time measured in the number of seconds.

randomBool ( ) : bool

Private Methods

Méthode Description
_NormalizeAngle ( this angle, double lowerBound, double upperBound, double range = 2*Math.PI ) : double

Method Details

ApproximatelyEqual() public static méthode

public static ApproximatelyEqual ( double left, double right, double epsilon = 0.001 ) : bool
left double
right double
epsilon double
Résultat bool

FromUnixTimestamp() public static méthode

Creates a new System.DateTime from the specified timestamp (time measured in the number of seconds).
public static FromUnixTimestamp ( int unixTimestamp ) : System.DateTime
unixTimestamp int The timestamp that represents the date to be created.
Résultat System.DateTime

Magnitude() public static méthode

public static Magnitude ( this vector ) : double
vector this
Résultat double

Multiply() public static méthode

public static Multiply ( this vector, double coefficient ) : Vector3
vector this
coefficient double
Résultat Vector3

NormalizeOrientation() public static méthode

public static NormalizeOrientation ( this angle ) : double
angle this
Résultat double

NormalizeTurn() public static méthode

public static NormalizeTurn ( this angle ) : double
angle this
Résultat double

PointToSegmentDistance() public static méthode

public static PointToSegmentDistance ( Vector3 segmentBegin, Vector3 segmentEnd, Vector3 point ) : double
segmentBegin Vector3
segmentEnd Vector3
point Vector3
Résultat double

PrintTimeSpan() public static méthode

public static PrintTimeSpan ( this time, bool isInPast = true ) : string
time this
isInPast bool
Résultat string

Quadrance() public static méthode

public static Quadrance ( this vector ) : double
vector this
Résultat double

SphereIntersectsLineSegment() public static méthode

public static SphereIntersectsLineSegment ( Vector3 segmentBegin, Vector3 segmentEnd, Vector3 sphereCenter, double radius ) : bool
segmentBegin Vector3
segmentEnd Vector3
sphereCenter Vector3
radius double
Résultat bool

UnixTimestamp() public static méthode

Returns the specified time measured in the number of seconds.
public static UnixTimestamp ( System.DateTime dateTime ) : int
dateTime System.DateTime The System.DateTime to obtain the number of seconds from.
Résultat int

randomBool() public static méthode

public static randomBool ( ) : bool
Résultat bool

Property Details

Random public_oe static_oe property

public static Random,System Random
Résultat System.Random