# JointLimit record struct

> How far a joint lets its child turn about one of its axes, as a least and a greatest angle in radians. A CollisionJoint and a JointSpec each hold three, for the joint's X, Y and Z axes.

Namespace `EvilEngine.Formats.Collision`, assembly `EvilEngine.Formats`. Engine commit 4ff877b1.

```csharp
public readonly record struct JointLimit
```

How far a joint lets its child turn about one of its axes, as a least and a greatest angle in radians. A [CollisionJoint](/docs/api/collisionjoint) and a [JointSpec](/docs/api/jointspec) each hold three, for the joint's X, Y and Z axes.

```csharp
Limits = [JointLimit.Free, new JointLimit(0, 0), new JointLimit(-2.4, 0)]
```

The physics world leaves an axis free when its limit runs from -π or less to π or more, and holds it within the limit otherwise. A limit whose least is above its greatest, or either isn't finite, is refused with `ArgumentOutOfRangeException` when the joint is made, and a collision holding one won't be written.

## Members

### JointLimit (constructor)

```csharp
public JointLimit(double Min, double Max)
```

Makes a limit from its least and greatest angle in radians.

### Free (field)

```csharp
public static readonly JointLimit Free
```

-π to π, an axis free to turn all the way round. Every axis is free unless a joint says otherwise.

### Min (property)

```csharp
public double Min { get; init; }
```

The least angle in radians, how far the child may turn the negative way.

### Max (property)

```csharp
public double Max { get; init; }
```

The greatest angle in radians, how far the child may turn the positive way.

### Locked (property)

```csharp
public bool Locked { get; }
```

Whether [Min](#min) and [Max](#max) are the same, so the axis can't turn at all.
