Skip to content
Will Pearson edited this page Aug 12, 2016 · 2 revisions

RhinoMath Class

Provides constants and static methods that are additional to Math.

Inheritance Hierarchy

System.Object
  Rhino.RhinoMath
Namespace: Rhino
Assembly: RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0

Syntax

C#

public static class RhinoMath

VB

Public NotInheritable Class RhinoMath

The RhinoMath type exposes the following members.

Methods

 

Name Description
Public methodStatic member Clamp(Double, Double, Double) Restricts a Double to be specified within an interval of two numbers.
Public methodStatic member Clamp(Int32, Int32, Int32) Restricts a Int32 to be specified within an interval of two integers.
Public methodStatic member CRC32(UInt32, Byte[]) Advances the cyclic redundancy check value remainder given a byte array. http://en.wikipedia.org/wiki/Cyclic_redundancy_check.
Public methodStatic memberCode example CRC32(UInt32, Double) Advances the cyclic redundancy check value remainder given a Double. http://en.wikipedia.org/wiki/Cyclic_redundancy_check.
Public methodStatic member CRC32(UInt32, Int32) Advances the cyclic redundancy check value remainder given a Int32. http://en.wikipedia.org/wiki/Cyclic_redundancy_check.
Public methodStatic member EpsilonEquals(Double, Double, Double) Compare two doubles for equality within some "epsilon" range
Public methodStatic member EpsilonEquals(Single, Single, Single) Compare to floats for equality within some "epsilon" range
Public methodStatic member IsValidDouble Determines whether a Double value is valid within the RhinoCommon context. Rhino does not use Double.NaN by convention, so this test evaluates to true if:

x is not equal to RhinoMath.UnsetValue

System.Double.IsNaN(x) evaluates to false

System.Double.IsInfinity(x) evaluates to false

Public methodStatic member IsValidSingle Determines whether a Single value is valid within the RhinoCommon context. Rhino does not use Single.NaN by convention, so this test evaluates to true if:

x is not equal to RhinoMath.UnsetValue,

System.Single.IsNaN(x) evaluates to false

System.Single.IsInfinity(x) evaluates to false

Public methodStatic member ToDegrees Convert an angle from radians to degrees.
Public methodStatic member ToRadians Convert an angle from degrees to radians.
Public methodStatic member UnitScale Computes the scale factor for changing the measurements unit systems.
  Back to Top

Fields

 

Name Description
Public fieldStatic member DefaultAngleTolerance Represents the default angle tolerance, used when no other values are provided. This is one degree, expressed in radians.
Public fieldStatic member SqrtEpsilon Represents a default value that is used when comparing square roots. This value is several orders of magnitude larger than ZeroTolerance.
Public fieldStatic member UnsetSingle Gets the single precision floating point number that is considered 'unset' in Rhino.
Public fieldStatic member UnsetValue Gets the Rhino standard Unset value. Use this value rather than Double.NaN when a bogus floating point value is required.
Public fieldStatic member ZeroTolerance Gets the Zero Tolerance constant (1.0e-12).
  Back to Top

Version Information

Supported in: 5D58w

See Also

Reference

Rhino Namespace

Clone this wiki locally