How do I calculate a line segment that is a certain number of degrees from another line segment?

I have a line segment that is at an arbitrary angle in 3D space. I want to (in code) draw another line that shares an end point with the first line and has an angle of X degrees between them. The second line will partially overlap the first in the XZ plane.

pathfinder 2e – How do criticals interact with degrees of success for attacks?

In General

Chapter 9: Playing the Game (Core Rules) describes how criticals work. As you noted, a critical success and failures occur when your result is the DC +/- 10. You seem to misunderstanding how rolling a natural 20 works. From page 445:

If you rolled a 20 on the die (a “natural 20”), your result is one degree of success better than it would be by numbers alone. If you roll a 1 on the d20 (a “natural 1”), your result is one degree worse.

A natural 20 is not a critical hit. A natural 1 is not a critical failure. They only modify what your result would have been by one step.

Your Examples

In your first example (a strike against a DC 35), you have a success. Your result of 30 would normally be a failure, but since it is a natural 20 it becomes a success.

The second example works the same. If you would have failed your saving throw, that natural 20 makes it a success. If it would have been a critical failure, then it now becomes a failure instead.

About Attacks…

The current printings of the Core Rulebook do have a different section which addresses critical success on attacks. These are on page 278 (in the Weapons section). Under these rules, a natural 20 is a critical success on an attack.

However, as this answer on another question on the same rule points out, Paizo announced at PaizoCon their intent to errata this rule away as it was an error.

pathfinder 2e – How do criticals interact with degrees of success for attacks in PF2E?

Let’s say my character Strikes an enemy with AC 40. My attack bonus is only +10, so barring crits, it’s impossible for me to get through his AC.

I roll a natural 20, making my total 30 vs his 40 AC. Is this attack treated as a regular hit, because it would have been a failure but the nat 20 improves the degree of success by one step? Or is it treated as a critical hit, because it’s a nat 20?

Similarly, if I’m subjected to a spell with a saving throw I can only fail at, and I roll a nat 20, does that mean I reach a success on the saving throw or a critical success?

unity – Using Euler angles to rotate object 360 degrees

I’m trying to create script that rotates object in given axis by set amount of degrees.

That’s my 2 core methods

public Vector3 rotation;

public void RotateDegreesFast ()
{
    transform.DOLocalRotate (GetTargetRotation (), rotationTime);
}

private Vector3 GetTargetRotation ()
{
    Vector3 newRotation = new Vector3 (
        rotation.x + transform.localEulerAngles.x,
        rotation.y + transform.localEulerAngles.y,
        rotation.z + transform.localEulerAngles.z)

    return newRotation;
}

I was using this script for a little while, it was working perfectly in Y and Z axis. Now I try to rotate object 45 degrees in X axis (rotation = new Vector3(45f, 0f, 0f)). It works until rotation in x value equals 135. Transform.localEulerAngles.x is returning 45 instead of 135. So it’s stuck between 90 and 135 degrees. I was trying to use transform.localRotation.eulerAngles.x instead, but it doesn’t work as well.

I am aware this works that way because specific Euler angle can be represented in many ways. I also know that DOTween has DOLocalRotateQuaternion method, but the thing is that this component is often reused by a designer that sets value of rotation variable in the inspector. It’s way easier to use Euler angles for him.

unity – Move Object θ Degrees Over T Time

Note, this happens on click and not in the update cycle

I have a game object that i rotate at a given angle, around a point without a time component like this(works as intended):

void Rotate(a)
{
    var parent = transform.parent;
    Vector3 point = new Vector3(0, 0, 0);
    Vector3 axis = new Vector3(0, 0, 1);

    parent.transform.RotateAround(Pivot.bounds.center, axis, a);
}

note that the parent is an empty to manipulate the anchor point

I wish to animate the rotation over time, however each method produces an inaccurate result. The two functions I have tried:

IEnumerator RotateOverTime(float byAngles, float inTime)
{
    var parent = transform.parent;
    Vector3 axis = new Vector3(0, 0, 1);

    var stepAngle = byAngles/ (inTime/ 1000f);

    float timer = 0;
    while (timer <= (inTime/ 1000f))
    {
        parent.transform.RotateAround(Pivot.bounds.center, axis, stepAngle * Time.deltaTime);
        timer += Time.deltaTime;
        yield return null;
    }
    yield return null;
}

IEnumerator RotateMe(Vector3 byAngles, float inTime)
{
    var parent = transform.parent;
    var fromAngle = parent.transform.rotation;
    var toAngle = Quaternion.Euler(parent.transform.eulerAngles + byAngles);
    for (var t = 0f; t < 1; t += Time.deltaTime / inTime)
    {
        parent.transform.rotation = Quaternion.Lerp(fromAngle, toAngle, t);
        yield return null;
    }
}

The Problem:

The above two methods doesn’t rotate the object by the exact amount of degrees, see image below where the angle in question is 90deg. You can clearly see by the grid what the issue is

Starting Position

End Position

graph theory – Sequences of degrees by iterated vertex removal

Let $G=(V, E)$ be a graph of order $n$. Let $(v_1, dots, v_n)$ be a sequence of vertices. Let $G_i=G({v_{i+1}, dots, v_n})$ be the induced subgraph on the last $n-i$ vertices. Let $d_i$ be the degree of $v_i$ in $G_i$. We then obtain a sequence of non-negative integers $(d_1, dots, d_n)$. Of course, from a graph $G$, we can obtain a family of such integer sequences depending on the sequence of vertices we start with.

I wonder whether such integer sequences have been studied, as there are some natural and interesting questions regarding such sequences. For example, my original motivation is to obtain, for a given graph, such a sequence that is maximum with respect to the majorization order. A natural strategy would be to choose $v_1$ with maximum degree in $G_0$, and $v_2$ with maximum degree in $G_1$, and so on. But first there is an ambiguity about several vertices with the maximum degree in $G_0$. Second, it is not even a priori clear to me that whether we should stick to vertices with maximum degree…

Thank you for any information and suggestions.

probability – How to know the degrees of freedom in chi-squared distribution?

I have a little knowledge of statistics, so correct me if the question is not well-phrased/formulated.

Let ${X_1, dots, X_N}$ be independent normal random variables with mean 0 and variance $sigma^2$.
If we define $Z$ as $Z = frac{sigma^2}{N}sum_{i=1}^N|X_i^2|$, then $sum_{i=1}^N|X_i^2|$ is a chi-squared random variable with N degrees of freedom.
Now assume for the same sample set, each sample $X_i$ is a normal random variable with mean 0 and: variance $sigma^2 = sigma_1^2$ with probability $p$; and with variance $sigma^2 = sigma_1^2 + sigma_2^2$ with probability $q = 1 – p$.

If I define the same $Z = frac{sigma^2}{N}sum_{i=1}^N|X_i^2|$, then what is the degree of freedom of $sum_{i=1}^N|X_i^2|$? and why? I assume it should be $N$ because the sample size is $N$, but what I see in the papers is $2N$.
Thanks in advance.

is there a Terminal command to show a summary of memory used, temperature degrees, and GPU use in a single screen, in a simple way?

is there a Terminal command to show a summary of memory used, temperature degrees, and GPU use in a single screen, in a simple way?

So, I want in terminal to give me information in a summary fashion of Memory used (not swap etc.), GPU Use (as a percentage), and temperature degrees – how hot is getting CPU?

Right now, I must use three different terminal commands:

watch free -m    # For Memory use
watch sensors    # For Temperature
watch ndivia-smi # For GPU use

Is there a way to display such information in a single screen?
These commands produce a lot of information that someone may not need it rightway.

The first line may show the memory use.
The second line may show GPU use.
The third line may display Temperatures.

Is this possible?

Says that my variable is 45 degrees and not valid

I tried to run Solve[2x+1==6,x] and it has given me an error saying 45 degrees is not a valid variable. How do I fix this?

Skills matter more than Degrees in the USA now

Trump decided to make working in a US company rely on your skills more than the degrees you have, i like that to be honest, since having a degree doesn’t really mean you are qualified to practice a job .