Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 2 3 4 5 6 … 18 Next »
Vector methods
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Vector methods
04-10-2020, 07:21 PM,
#1
The17thDoctor Offline
TSCM Average Enjoyer
****
Posts: 1,100
Threads: 249
Joined: Oct 2015
Vector methods
Is there any way to add methods to the vector class such as Vector:__div(vector) ( Dividing x/x2 & y/y2 & z/z2 )

The17thDoctor: Server take me to the most handsome person
srcds_linux: I cant send people to themselves...
Website Find
Reply
05-10-2020, 04:16 PM,
#2
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: Vector methods
Dividing vectors in that way doesn't make much sense, which is why no such method exists.

What is the use case for wanting it? If it's scaling, I could add Vector:Scale() and Vector:InverseScale() methods to do component-wise multiplication and division respectively, though you can already use a VMatrix to do this.
Find
Reply
05-10-2020, 04:20 PM,
#3
The17thDoctor Offline
TSCM Average Enjoyer
****
Posts: 1,100
Threads: 249
Joined: Oct 2015
RE: Vector methods
My original use was to calculate the size of a prop's new bounding box relative to its original size ( So I wanted to do new_size/original_size and it'd give me a vector scale ) But I solved that yesterday.

The17thDoctor: Server take me to the most handsome person
srcds_linux: I cant send people to themselves...
Website Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.