Skip to content

Extra from gmlscripts #70

Description

@CryoEagle

Ai

  • intercept_course(origin,target,speed) ✔️
    Returns the course direction required to hit a moving target at a given projectile speed, or (-1) if no solution is found.

Date Time

  • date_time_string(format); ❌
  • unix_timestamp([datetime]) ❌
    Returns a Unix timestamp for the current time or optionally given SimplexRpgEngine datetime value.

Draw

  • draw_text_shadow(x,y,str,color,shadow,intensity,distance,direction)

Strings

  • int_to_base(int number, int base) --> string ✔️

Misc

  • line_get_slope(Vector2 p1, Vector2 p2) ✔️
  • boxstep(a, b, x) ✔️
  • smoothstep(a, b, x) ✔️

Math

  • factorial(n) ✔️
  • permutations(set, subset) ✔️
  • random_weighted(p1, [p2..]) 🔸✔️ --> irandom_weighted
  • fibonacci(n) ✔️
  • lcm(a, b) ✔️
  • gcd(a, b) ✔️
  • next_pow2(n) 📌✔️ --> far more efficient implementation

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions