# math

1. ### !IMPORTANT! - Real Comparision BUG

Hello everyone, I just notice a bug (I hope it's not my warcraft 3) I have 1.33.0.19252 version of Warcraft 3 classic when there is a comparison (superiod or equal) between 2 reals (one of them is a counter) it can't detect the 2 amounts are equals if the amount added is lower than 0.1 here...
2. ### [Math] I need a math formula for my trigger

salutations. let me explain what kind of formula i need. i want to say that when distance between two units is high, then variableX becomes lower (not under 0). and when is low, then variableX becomes higher. i dont want values lower than 0. and note that there is only "- + x /" im waiting for...
3. ### Accurate ParabolaZ function

It has recently come to my attention that a number of ParabolaZ functions are incorrect, or rather, they are only accurate if the initial Z level and final Z level are identical - or if the maximum height value is sufficiently greater than either of the Z values. Take for example, the popular...
4. ### Fixed Velocity Spiral

There are many spells which move in a spiral pattern, but they pretty much all use a fixed angular velocity as they spiral out. This means the movement itself increases in speed as it gets further and further away from the center. I've written a function that allows a spiral path to be traced...
5. ### [Solved] [Math Problem] Implementing XY velocity to double jump

HELP! I SUCK! 2 hours and I still can't figure it out! So here's a sample trigger I have when the unit jumps from the ground: Set InitialVelocity = 100 Set InitialHeight = 0 When a unit jumps from mid air: Set InitialVelocity = 2*InitialVelocty + (Acceleration_Variable)*(Time_Variable) Set...
6. ### Directions (Angles,Cos,Sin...) How does it work in wc3?

I'll be honest, I'm not a genius when it comes to math. Currently I'm really struggling with angles and such in vJass. I don't know how to calculate the locations for my spell. For example, I want to make a fireball, that spawns at the casters position and moves to the target location and deals...
7. ### How to find absolute 0-360 angle? (and in radian)

What if I have: x = 540 (same as 180) or x = 630 (same as 270) I wanted x to be just around 0-360 How do I achieve this? And please explain this in radian too 'cause that's my main purpose to learn :) In radian: x = 3π (in degree, it's 540 which is same as 180) x should only be around 0-2π ??
8. ### Help Rotating Spawned Units

Im looking for help regarding rotating units from one area to an other where they need to keep their position but be able to rotate how they are positioned. I've looked around on the internet and haven't found a solution and I've also experimented around for a long time now and cant figure it...
9. ### Modulo - How to use it to detect a multiple of a real

Hello, I'm having trouble using Modulo. I read some posts on here and tried to recreate what they did but nothing seems to work. When I thought I had it set up correctly the trigger completely stopped working, which was weird because the modulo was just a small calculation that shouldn't have...
10. ### Unit travel time formula

What is the formula to get the duration a unit need to travel to a point? Example: - Blood Mage has 200 movement speed point (from Object Editor). - The distance of the path going to the target point is 1500. Travel duration = ?? Additional Question If the Blood Mage for example travel the...
11. ### Safe way to get the middle of 2 angles value?

If: angle1 = 90 angle2 = 180 midAngle = 135 <-- Okay, no problem. If: angle1 = 360 angle2 = 90 midAngle = 225 (wrong: not a middle between 360 and 90, toward south) <-- Which must supposedly be 45 (toward north) Formula used: midAngle = angle1 + ( (angle2 - angle1) / 2 ) Any suggestion?
12. ### [General] Math hard, want formula, too dumb

I'm trying to make so player can level up and pick ability "health bonus" I don't math math, help me please I just want it so for that every additional level of the ability "health bonus" they don't get +10 per level, they get - Level 0 = nothing, of course Level 1 = +10 Health Level 2 =...
13. ### [JASS] Getting Correct real Rotation

I've decided to start making my own spells in JASS. So far I'm creating spawn target points with Polar Offset based from the cast click point. I've followed this guide but it's a little difficult since I'm not very knowledgeable with geometry Math. So I'm taking it one step at a time. This is...
14. ### [Solved] Gold income units.

I make this: "Money Events Time - Every 10.00 seconds of game time Conditions Actions Player - Add ((Number of living Sludge Minion units owned by Player 1 (Red))) to Player 1 (Red) Current gold" But I want make this: "Money Events Time - Every 10.00 seconds of game time Conditions...
15. ### [vJASS] Knockback System

EDIT: I realized I wrote lot more text than decency allows, so, in short: Is there a knockback system that will slide an unit to exact point (i.e. slide exact distance)? Or, how to do math for in this one to achieve just that? I need a knockback system (because I'm rather too lazy to make it...
16. ### Math - Something for every 5th time?

Is there a mathematical way I can set a trigger to activate so that every 5th time a unit checks into a building/region, something will happen, like extra gold? I'm tired of typing out the "if condition" for every 5th time :P